| 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 | 1 | ▶ | use Carp (); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 0 | ▶ | sub provides { | ||||||||||||||||||
|
Subroutine
provides: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 10 | 0 | Carp::confess "subclass $_[0] did not override virtual method 'provides'"; | |||||||||||||||||||
| 11 | } | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | # input: ( [ foo => { -as => 'bar' } ], ... ) | ||||||||||||||||||||
| 14 | # return: { foo => 'bar', ... } | ||||||||||||||||||||
| 15 | 7 | ▶ | sub canon_args { | ||||||||||||||||||
|
Subroutine
canon_args: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||
| 16 | 7 | my ($plugin, $args) = @_; | |||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | 7 | my %n; | |||||||||||||||||||
| 19 | 7 | my @args = @{ Data::OptList::mkopt($args) }; | |||||||||||||||||||
| 20 | 7 | for (@args) { | |||||||||||||||||||
| 21 | 7 | my ($method, $xtra) = @$_; | |||||||||||||||||||
| 22 | 7 | ▶ | my $name = $xtra->{-as} || $method; | ||||||||||||||||||
|
Condition66%2/3
$xtra->{'-as'} || $method
MC/DC0%0/2
$xtra->{'-as'} || $method
$xtra->{'-as'}
$method
Truth table66%2/3
A || B
A= $xtra->{'-as'}B= $method
| |||||||||||||||||||||
| 23 | #$name = "$xtra->{-prefix}$name" if $xtra->{-prefix}; | ||||||||||||||||||||
| 24 | 7 | $n{$method} = $name; | |||||||||||||||||||
| 25 | } | ||||||||||||||||||||
| 26 | 7 | return \%n; | |||||||||||||||||||
| 27 | } | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 1 | 1; | |||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | __END__ | ||||||||||||||||||||