Condition Coverage

blib/lib/String/Expando.pm
Criterion Covered Total %
condition 16 40 40.0


and 3 conditions

line !l l&&!r l&&r condition
107 0 13 0 defined $fmt and length $fmt

or 2 conditions

line l !l condition
29 0 2 $self->{'consume_expando'} ||= sub { / \G \% ([^%()]*) \( ([^\s()]+) \) /cgx ? ($2, $1) : (); }
41 0 2 $self->{'consume_literal'} ||= sub { / \G (.) /cgx ? $1 : (); }
52 0 2 $self->{'consume_escaped_literal'} ||= sub { / \G \\ (.) /cgx ? $1 : (); }
65 0 1 $self->{'decoder'} || \&String::Expando::decode
75 0 1 $self->{'decoder'} ||= sub { my($self, $code, $stash) = @_; my @parts = split(/$rx/, $code, 0); my $val = $stash; foreach my $part (@parts) { $val = &$part_decoder($self, $part, $val); last unless defined $val; } ; return $val; }
78 0 1 $self->{'decoder'} ||= \&String::Expando::decode
80 0 2 $self->{'stringify'} ||= \&String::Expando::stringify
81 0 2 $self->{'stash'} ||= {}
82 0 2 $self->{'functions'} ||= {}
83 1 1 $self->{'default_hash_keys'} ||= ['', '""', q[']]
144 0 0 $func ||= {}

or 3 conditions

line l !l&&r !l&&!r condition
93 19 0 0 $stash ||= $self->{'stash'}
104 28 0 0 defined($res = &$lit) || defined($res = &$esc)
125 18 3 0 eval { do { $val = $stash->{$code}; 1 } } or eval { do { $val = $stash->[$code]; 1 } }
140 0 0 0 $stash || $self->stash
161 0 0 0 defined $l or defined $r