Class-Phrasebook
view release on metacpan or search on metacpan
Phrasebook.pm view on Meta::CPAN
if ($read_on && $string =~ /[\S]/) {
# if we have already $phrase_value, we should add a
# new line to it, before we add the next line.
$phrase_value .= "\n" if ($phrase_value);
$phrase_value .= $string;
}
}
} # of Char
); # of the parser setHandlers class
# open the xml file as a locked file and parse it
my $fh = new IO::LockedFile("<".$self->{FILE_PATH});
unless ($fh) {
$self->log()->write("Could not open ".$self->{FILE_PATH}.
" to read.", 4);
return 0;
}
eval { $parser->parse($fh) }; # I use eval because the parse function dies
# on parsing error.
if ($@) {
$self->log()->write("Could not parse the ".$self->{FILE_PATH}.
( run in 0.508 second using v1.01-cache-2.11-cpan-49f99fa48dc )