| 1 | package exact::role; | ||||||||||||||||||||
| 2 | # ABSTRACT: Simple role interface extension for exact | ||||||||||||||||||||
| 3 | |||||||||||||||||||||
| 4 | 6 | ▶ | use 5.014; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 6 | ▶ | use exact; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 6 | ▶ | use Import::Into; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | 6 | ▶ | use feature (); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | 6 | ▶ | use Role::Tiny (); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 6 | our $VERSION = '1.21'; # VERSION | |||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | 6 | my ($perl_version) = $^V =~ /^v5\.(\d+)/; | |||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 9 | ▶ | sub import { | ||||||||||||||||||
|
Subroutine
import: called CC=3 SCAR=11.2
| |||||||||||||||||||||
| 15 | 9 | my ( $self, $params, $caller ) = @_; | |||||||||||||||||||
| 16 | 9 | ▶ | $caller //= caller(); | ||||||||||||||||||
|
Condition66%2/3
$caller //= caller()
MC/DC0%0/2
$caller //= caller()
$caller
caller()
Truth table66%2/3
A //= B
A= $callerB= caller()
| |||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | 9 | Role::Tiny->import::into($caller); | |||||||||||||||||||
| 19 | 9 | exact->import::into( $caller, 'class', 'noautoclean' ); | |||||||||||||||||||
| 20 | 9 | ▶ | feature->unimport('class') if ( $perl_version > 36 ); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 2 | ▶ | sub does_role { | ||||||||||||||||||
|
Subroutine
does_role: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 24 | 2 | Role::Tiny::does_role(@_); | |||||||||||||||||||
| 25 | } | ||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | 1 | ▶ | sub apply_roles_to_package { | ||||||||||||||||||
|
Subroutine
apply_roles_to_package: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 28 | 1 | shift; | |||||||||||||||||||
| 29 | 1 | Role::Tiny->apply_roles_to_package(@_); | |||||||||||||||||||
| 30 | } | ||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | 1 | ▶ | sub apply_roles_to_object { | ||||||||||||||||||
|
Subroutine
apply_roles_to_object: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 33 | 1 | shift; | |||||||||||||||||||
| 34 | 1 | Role::Tiny->apply_roles_to_object(@_); | |||||||||||||||||||
| 35 | } | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | 1 | ▶ | sub create_class_with_roles { | ||||||||||||||||||
|
Subroutine
create_class_with_roles: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 38 | 1 | shift; | |||||||||||||||||||
| 39 | 1 | Role::Tiny->create_class_with_roles(@_); | |||||||||||||||||||
| 40 | } | ||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 3 | ▶ | sub is_role { | ||||||||||||||||||
|
Subroutine
is_role: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 43 | 3 | shift; | |||||||||||||||||||
| 44 | 3 | Role::Tiny->is_role(@_); | |||||||||||||||||||
| 45 | } | ||||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | 6 | 1; | |||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | __END__ | ||||||||||||||||||||