File Coverage

blib/lib/MAB2/Record/titel.pm
Criterion Covered Total %
statement 12 12 100.0
branch 1 2 50.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 17 19 89.4


line stmt bran cond sub pod time code
1             package MAB2::Record::titel;
2             our $VERSION = '0.01';
3 2     2   923 use base qw(MAB2::Record::Base);
  2         4  
  2         859  
4              
5 2     2   12 use strict;
  2         4  
  2         59  
6 2     2   9 use overload '""' => "as_string";
  2         4  
  2         12  
7              
8             my $KDocs;
9             my $RDocs;
10              
11             {
12             local $/;
13             my $strdocs = ;
14             close DATA;
15             ($KDocs, $RDocs) = __PACKAGE__->parsedoc($strdocs);
16             }
17              
18             # cannot inherit, $RDocs is different here
19             sub segmentname {
20 2     2 0 1282 my $self = shift;
21 2         4 my $rec = shift;
22 2 50       12 $RDocs->{$rec}[3] || $self->SUPER::segmentname($rec);
23             }
24              
25             1;
26              
27             # titelmab.txt
28             __DATA__