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