Moose/Writer.pm

filter: Statementstmt 42.1% 8 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 20.0% 1 / 5 Podpod 100% 3 / 3 totaltotal 44.4% 12 / 27 CC 1 SCAR 5.9
CC
1
Cov
42%
__ANON__
2.0
begin
2.0
end
2.0
CRAP 1.8
« Moose/Parser/MarcxmlSaxSimple.pm ↑ Summary Moose/Reader/File/Marcxml.pm »
1 package MARC::Moose::Writer;
2 # ABSTRACT: A Moose::Role to write somewhere MARC::Moose records
3 1 $MARC::Moose::Writer::VERSION = '1.0.49';
4 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 with 'MooseX::RW::Writer';
7  
8  
9  
10  
11 has formater => (
12 is => 'rw',
13 isa => 'MARC::Moose::Formater',
14 0 ▶ default => sub { MARC::Moose::Formater::Text->new() }
Subroutine __ANON__: not called CC=1 SCAR=6.9
15 1 );
16  
17  
18  
19 1 has fh => ( is => 'rw' );
20  
21  
22  
23 0 ▶sub begin {
Subroutine begin: not called CC=1 SCAR=6.9
Pod documented
24 0 my $self = shift;
25 0 my $fh = $self->fh;
26 0 print $fh $self->formater->begin();
27 };
28  
29  
30  
31 0 ▶sub end {
Subroutine end: not called CC=1 SCAR=6.9
Pod documented
32 0 my $self = shift;
33 0 my $fh = $self->fh;
34 0 print $fh $self->formater->end();
35 };
36  
37  
38  
39 0 ▶sub write {
Subroutine write: not called CC=1 SCAR=6.9
Pod documented
40 0 my ($self, $record) = @_;
41 0 my $fh = $self->fh;
42 0 print $fh $self->formater->format($record);
43 0 $self->count( $self->count + 1);
44 }
45  
46  
47 1 1;
48  
49 __END__
« Moose/Parser/MarcxmlSaxSimple.pm ↑ Summary Moose/Reader/File/Marcxml.pm »