Tie/Plugin.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond 66.6% 2 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 89.6% 26 / 29 SCAR 11.0
CC
3
Cov
95%
canon_args
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« Tie/Plugin/Scalar.pm ↑ Summary Tie/LP.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Pad::Tie::Plugin;
5  
6 1 ▶use Data::OptList;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 # input: ( [ foo => { -as => 'bar' } ], ... )
9 # return: { foo => 'bar', ... }
10 sub canon_args {
11 5 ▶ my ($plugin, $args) = @_;
Subroutine canon_args: called CC=3 SCAR=11.0
Pod documented
12  
13 5 my %n;
14 5 my @args = @{ Data::OptList::mkopt($args) };
15 5 for (@args) {
16 5 my ($method, $xtra) = @$_;
17 5 ▶ my $name = $xtra->{-as} || $method;
Condition66%2/3
$xtra->{'-as'} || $method
l!l&&r!l&&!r
230
MC/DC0%0/2
$xtra->{'-as'} || $method
$xtra->{'-as'} $method
Truth table66%2/3
A || B
A= $xtra->{'-as'}B= $method
ABresult
1X1
011
000
18 #$name = "$xtra->{-prefix}$name" if $xtra->{-prefix};
19 5 $n{$method} = $name;
20 }
21 5 return \%n;
22 }
23  
24 1 1;
25  
26 __END__
« Tie/Plugin/Scalar.pm ↑ Summary Tie/LP.pm »