File Coverage

lib/ChordPro/lib/SVGPDF/Defs.pm
Criterion Covered Total %
statement 11 27 40.7
branch 0 8 0.0
condition 0 3 0.0
subroutine 4 5 80.0
pod 0 1 0.0
total 15 44 34.0


line stmt bran cond sub pod time code
1             #! perl
2              
3 10     10   138 use v5.26;
  10         39  
4 10     10   69 use Object::Pad;
  10         24  
  10         81  
5 10     10   1388 use utf8;
  10         24  
  10         60  
6 10     10   466 use Carp;
  10         44  
  10         3489  
7              
8             class SVGPDF::Defs :isa(SVGPDF::Element);
9              
10 0     0 0   method process () {
  0            
  0            
11 0           my $atts = $self->atts;
12 0           my $xo = $self->xo;
13 0 0         return if $atts->{omit}; # for testing/debugging.
14              
15 0           $self->_dbg( "+", $self->name, " ====" );
16              
17 0           for ( $self->get_children ) {
18 0 0         next if ref($_) eq 'SVGPDF::TextElement';
19 0           my $id = $_->atts->{id};
20 0 0         unless ( defined($id) ) {
21 0 0 0       warn("SVG: Missing id for ", $_->name, " in defs (skipped)\n")
22             if $self->root->verbose && $_->name ne "style";
23 0           next;
24             }
25 0           $self->_dbg( "defs: \"$id\" (", $_->name, ")" );
26 0           $self->root->defs->{ "#$id" } = $_;
27             }
28              
29 0           $self->_dbg( "-" );
30             }
31              
32              
33             1;