| 1 | package Aion::Meta::RequiresAnyFunction; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 6 | ▶ | use common::sense; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | 6 | ▶ | use Aion::Meta::Util qw//; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 6 | Aion::Meta::Util::create_getters(qw/pkg name/); | |||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 5 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=8.1
Pod
documented
| |||||||||||||||||||||
| 10 | 5 | my $cls = shift; | |||||||||||||||||||
| 11 | 5 | ▶ | bless {@_}, ref $cls || $cls; | ||||||||||||||||||
|
Condition33%1/3
ref $cls || $cls
MC/DC0%0/2
ref $cls || $cls
ref $cls
$cls
Truth table33%1/3
A || B
A= ref $clsB= $cls
| |||||||||||||||||||||
| 12 | } | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 3 | ▶ | sub compare { | ||||||||||||||||||
|
Subroutine
compare: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 15 | 3 | my ($self, $other) = @_; | |||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 3 | ▶ | die "Requires ${\ $self->stringify}" unless ref $other eq 'CODE'; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 18 | } | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 3 | ▶ | sub stringify { | ||||||||||||||||||
|
Subroutine
stringify: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 21 | 3 | my ($self) = @_; | |||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 3 | return "$self->{name} of $self->{pkg}"; | |||||||||||||||||||
| 24 | } | ||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | 6 | 1; | |||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | __END__ | ||||||||||||||||||||