Moose/Parser/Yaml.pm

filter: Statementstmt 70.5% 12 / 17 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod n/a totaltotal 58.3% 14 / 24 CC 3 SCAR 20.3
CC
3
Cov
57%
__ANON__
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 7.6
« Moose/Parser/Iso2709.pm ↑ Summary Moose/Formater/Iso2709.pm »
1 package MARC::Moose::Parser::Yaml;
2 # ABSTRACT: Parser for YAML records
3 4 $MARC::Moose::Parser::Yaml::VERSION = '1.0.46';
4 4 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 4 extends 'MARC::Moose::Parser';
7  
8 4 ▶use YAML::Syck;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 4 $YAML::Syck::ImplicitUnicode = 1;
11  
12 # FIXME Experimental. Not used yet.
13 #has converter => (
14 # is => 'rw',
15 # isa => 'Text::IconvPtr',
16 # default => sub { Text::Iconv->new( "cp857", "utf8" ) }
17 #);
18  
19  
20  
21 override 'parse' => sub {
22 0 ▶ my ($self, $raw) = @_;
Subroutine __ANON__: not called CC=3 SCAR=24.8
23  
24 #print "\nRAW: $raw\n";
25 0 ▶ return unless $raw;
Branch: 1 branch
BranchTrueFalseTotal
unless $raw 0 0 0
26 0 my $record = Load( $raw );
27 0 ▶ $record->lint($self->lint) if $self->lint;
Branch: 1 branch
BranchTrueFalseTotal
if $self->lint 0 0 0
28 0 return $record;
29 4 };
30  
31 4 __PACKAGE__->meta->make_immutable;
32  
33 4 1;
34  
35 __END__
36  
37 =pod
38  
39 =encoding UTF-8
40  
41 =head1 NAME
42  
43 MARC::Moose::Parser::Yaml - Parser for YAML records
44  
45 =head1 VERSION
46  
47 version 1.0.46
48  
49 =head1 SEE ALSO
50 =for :list
51 * L<MARC::Moose>
52 * L<MARC::Moose::Parser>
53  
54 =head1 AUTHOR
55  
56 Frédéric Demians <f.demians@tamil.fr>
57  
58 =head1 COPYRIGHT AND LICENSE
59  
60 This software is copyright (c) 2022 by Frédéric Demians.
61  
62 This is free software; you can redistribute it and/or modify it under
63 the same terms as the Perl 5 programming language system itself.
64  
65 =cut
« Moose/Parser/Iso2709.pm ↑ Summary Moose/Formater/Iso2709.pm »