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