File Coverage

blib/lib/SVGPDF/Style.pm
Criterion Covered Total %
statement 25 25 100.0
branch 3 6 50.0
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 33 37 89.1


line stmt bran cond sub pod time code
1             #! perl
2              
3 2     2   983 use v5.26;
  2         5  
4 2     2   10 use Object::Pad;
  2         3  
  2         13  
5 2     2   197 use utf8;
  2         2  
  2         16  
6 2     2   38 use Carp;
  2         4  
  2         384  
7              
8             class SVGPDF::Style :isa(SVGPDF::Element);
9              
10 2     2 0 2 method process () {
  2         6  
  2         2  
11 2         7 my $atts = $self->atts;
12 2         7 my $xo = $self->xo;
13 2 50       7 return if $atts->{omit}; # for testing/debugging.
14              
15 2         5 $self->_dbg( "+", $self->name, " ====" );
16              
17 2         4 my $cdata = "";
18 2         6 for my $t ( $self->get_children ) {
19 2 50       7 croak("# ASSERT: non-text child in style")
20             unless ref($t) eq "SVGPDF::TextElement";
21 2         4 $cdata .= $t->content;
22             }
23 2 50       24 if ( $cdata =~ /\S/ ) {
24 2         6 $self->root->css->read_string($cdata);
25             }
26              
27             # Ok?
28              
29 2         6 $self->_dbg( "-" );
30             }
31              
32              
33             1;