blib/lib/HTML/FromANSI/Tiny.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 7 | 9 | 77.7 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
130 | 73 | 4 | 9 | $$self{'no_plain_tags'} && !@$attr |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
50 | 16 | 33 | 0 | $$self{'ansi_parser'} ||= do { my(@fields, %copy) = ('auto_reverse', 'foreground', 'background', 'remove_escapes'); @copy{@fields} = @$self{@fields}; 'Parse::ANSIColor::Tiny'->new(%copy) } |
79 | 1 | 10 | 0 | $$self{'_all_styles'} ||= do { my $parser = $self->ansi_parser; my $styles = {'bold', {'font-weight', 'bold'}, 'dark', {'opacity', '0.7'}, 'underline', {'text-decoration', 'underline'}, 'concealed', {'visibility', 'hidden'}}; { my $i = 0; foreach my $fg ($parser->foreground_colors) { $$styles{$fg} = {'color', $COLORS[$i++]}; }; $i = 0; foreach my $bg ($parser->background_colors) { $$styles{$bg} = {'background-color', $COLORS[$i++]}; }; }; +{%$styles, %{{} unless $$self{'styles'};}} } |