File Coverage

lib/ChordPro/lib/SVGPDF/Style.pm
Criterion Covered Total %
statement 11 25 44.0
branch 0 6 0.0
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 15 37 40.5


line stmt bran cond sub pod time code
1             #! perl
2              
3 10     10   141 use v5.26;
  10         42  
4 10     10   64 use Object::Pad;
  10         29  
  10         78  
5 10     10   1410 use utf8;
  10         26  
  10         72  
6 10     10   346 use Carp;
  10         23  
  10         2529  
7              
8             class SVGPDF::Style :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           my $cdata = "";
18 0           for my $t ( $self->get_children ) {
19 0 0         croak("# ASSERT: non-text child in style")
20             unless ref($t) eq "SVGPDF::TextElement";
21 0           $cdata .= $t->content;
22             }
23 0 0         if ( $cdata =~ /\S/ ) {
24 0           $self->root->css->read_string($cdata);
25             }
26              
27             # Ok?
28              
29 0           $self->_dbg( "-" );
30             }
31              
32              
33             1;