<commit_before>package Sisimai::Data::YAML;
use feature ':5.10';
use strict;
use warnings;
use Try::Tiny;
use Module::Load;

sub dump {
    # @Description  Data dumper(YAML)
    # @Param <obj>  (Sisimai::Data) Object
    # @Return       (String) Dumped data
    my $class = shift;
    my $argvs = shift // return undef;
    my $error = undef;

    return undef unless ref $argvs eq 'Sisimai::Data';
    my $damneddata = undef;
    my $yamlstring = '';

    try {
        Module::Load::load('YAML');
        $damneddata = $argvs->damn;
        $YAML::SortKeys = 1;
        $YAML::Stringify = 0;
        $YAML::UseHeader = 1;
        $YAML::UseBlock = 0;
        $YAML::CompressSeries = 0;
        $yamlstring = YAML::Dump( $damneddata );

    } catch {
        # YAML module is not installed
        $error = '*** ERROR: "YAML" module is not installed';
    };
<commit_msg>Change the label of error message<commit_after>package Sisimai::Data::YAML;
use feature ':5.10';
use strict;
use warnings;
use Try::Tiny;
use Module::Load;

sub dump {
    # @Description  Data dumper(YAML)
    # @Param <obj>  (Sisimai::Data) Object
    # @Return       (String) Dumped data
    my $class = shift;
    my $argvs = shift // return undef;
    my $error = undef;

    return undef unless ref $argvs eq 'Sisimai::Data';
    my $damneddata = undef;
    my $yamlstring = '';

    try {
        Module::Load::load('YAML');
        $damneddata = $argvs->damn;
        $YAML::SortKeys = 1;
        $YAML::Stringify = 0;
        $YAML::UseHeader = 1;
        $YAML::UseBlock = 0;
        $YAML::CompressSeries = 0;
        $yamlstring = YAML::Dump( $damneddata );

    } catch {
        # YAML module is not installed
        $error = ' ***error: "YAML" module is not installed';
    };

{'fraction_non_alphanumeric': 0.14512471655328799, 'fraction_numerical': 0.009070294784580499, 'mean_word_length': 2.501984126984127, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6477567', 'n_tokens_mistral': 652, 'n_tokens_neox': 599, 'n_words': 163}