blib/lib/Sub/Quote.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 49 | 61 | 80.3 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
25 | 1 | 7 | 0 | &_HAVE_PERLSTRING() && "$]" == 5.01 |
26 | 1 | 0 | 7 | !$ENV{'SUB_QUOTE_NO_HEX_FLOAT'} && "$]" >= 5.022 |
136 | 1747 | 90 | 623 | !utf8::is_utf8($value) && length((my $dummy = '') & $value) && 0 + $value eq $value |
1829 | 5 | 3 | !length($value) && length((my $dummy2 = '') & $value) | |
195 | 40 | 3 | 16 | ref $_[-1] eq 'HASH' && ref $_[-2] eq 'HASH' |
200 | 40 | 5 | 14 | $captures and not keys %$captures |
240 | 2 | 1 | 1 | $name and not $options->{'no_install'} |
288 | 3 | 0 | 0 | ref $hintshash->{$_} && $hintshash->{$_} =~ /\A(?:\w+(?:::\w+)*=)?[A-Z]+\(0x[[0-9a-fA-F]+\)\z/ |
303 | 0 | 3 | 5 | $unquoted &&= $$unquoted |
304 | 2 | 2 | 4 | $deferred and $deferred eq $sub |
0 | 1 | 3 | $unquoted and $unquoted eq $sub | |
315 | 0 | 40 | 2 | $unquoted and $$unquoted |
392 | 1 | 2 | 2 | $_->{'unquoted'} && ${$_->{'unquoted'};} |
line | l | !l | condition |
---|---|---|---|
168 | 7 | 1 | $extra || '' |
267 | 1 | 0 | $line ||= 1 |
299 | 10 | 0 | $sub or "" |
348 | 2 | 0 | $name || '__ANON__' |
3 | 1 | $name || '__ANON__' |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
172 | 1 | 2 | 2 | $local or $args ne "\@_" |
220 | 2 | 1 | 0 | /\A\w+(?:\(.*\))?\z/s or croak("invalid attribute $_") |
263 | 6 | 41 | 0 | $info->{'context'} ||= do { my($package, $hints, $warning_bits, $hintshash, $file, $line) = @{$info;}{"package", "hints", "warning_bits", "hintshash", "file", "line"}; $line ||= 1 if $file; my $line_mark = ""; if ($line) { $line_mark = "#line " . ($line - 1); if ($file) { $line_mark .= qq[ "$file"]; }; $line_mark .= "\n"; }; $info->{'context'} = "# BEGIN quote_sub PRELUDE\n" . "package $package;\n" . "BEGIN {\n" . " \$^H = " . quotify($hints) . ";\n" . " \${^WARNING_BITS} = " . quotify($warning_bits) . ";\n" . " %^H = (\n" . join("", map((" " . quotify($_) . " => " . quotify($hintshash->{$_}) . ",\n"), grep((!(ref $hintshash->{$_} && $hintshash->{$_} =~ /\A(?:\w+(?:::\w+)*=)?[A-Z]+\(0x[[0-9a-fA-F]+\)\z/)), keys %$hintshash))) . " );\n" . "}\n" . $line_mark . "# END quote_sub PRELUDE\n" } |
304 | 4 | 3 | 1 | $deferred and $deferred eq $sub or $unquoted and $unquoted eq $sub |