Taffeta/Graphics/Role/SVGRenderable/Style.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 26 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 use Renard::Incunabula::Common::Setup;
2 package Intertangle::Taffeta::Graphics::Role::SVGRenderable::Style;
3 # ABSTRACT: Role for style SVG parameters
4 $Intertangle::Taffeta::Graphics::Role::SVGRenderable::Style::VERSION = '0.001';
5 use Moo::Role;
6  
7 requires 'fill';
8 requires 'stroke';
9  
10 method svg_style_parameter() {
11 my $style = {};
12  
13 if( $self->has_fill ) {
14 $style = { %$style, %{ $self->fill->svg_style } };
15 }
16  
17 if( $self->has_stroke ) {
18 $style = { %$style, %{ $self->stroke->svg_style } };
19 }
20  
21 return ( style => $style );
22 }
23  
24 1;
25  
26 __END__