| 1 | 13 | ▶ | use 5.006; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 2 | 13 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 13 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | package Set::Associate::Utils; | ||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | # ABSTRACT: Shared Guts between Set::Associate modules | ||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 13 | our $VERSION = '0.004000'; | |||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 13 | our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 13 | require Exporter; | |||||||||||||||||||||||||||
| 14 | 13 | *import = \&Exporter::import; ## no critic (ProhibitCallsToUnexportedSubs) | |||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 13 | our @EXPORT_OK = qw( _warn_nonmethod ); | |||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | sub _carp { | ||||||||||||||||||||||||||||
| 19 | 5 | ▶ | require Carp; | ||||||||||||||||||||||||||
|
Subroutine
_carp: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 20 | 5 | goto \&Carp::carp; | |||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | sub _blessed { | ||||||||||||||||||||||||||||
| 24 | 0 | ▶ | require Scalar::Util; | ||||||||||||||||||||||||||
|
Subroutine
_blessed: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 25 | 0 | goto \&Scalar::Util::blessed; | |||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | ## no critic (RequireArgUnpacking) | ||||||||||||||||||||||||||||
| 29 | sub _warn_nonmethod { | ||||||||||||||||||||||||||||
| 30 | 15 | ▶ | if ( defined $_[0] and not ref $_[0] ) { | ||||||||||||||||||||||||||
|
Subroutine
_warn_nonmethod: called CC=7 SCAR=23.2
Branch: 1 branch
Condition66%2/3
defined $_[0] and not ref $_[0]
MC/DC50%1/2
defined $_[0] and not ref $_[0]
defined $_[0]
not ref $_[0]
Truth table66%2/3
A and not(B)
A= defined $_[0]B= not ref $_[0]
| |||||||||||||||||||||||||||||
| 31 | 10 | ▶ | return if $_[0]->isa( $_[1] ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||
| 33 | 5 | ▶ | if ( defined $_[0] and _blessed( $_[0] ) ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $_[0] and _blessed($_[0])
MC/DC0%0/2
defined $_[0] and _blessed($_[0])
defined $_[0]
_blessed($_[0])
Truth table33%1/3
A and B
A= defined $_[0]B= _blessed($_[0])
| |||||||||||||||||||||||||||||
| 34 | 0 | ▶ | return if $_[0]->isa( $_[1] ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||
| 36 | 5 | _carp( $_[1] . '->' . $_[2] . ' should be called as a method' ); | |||||||||||||||||||||||||||
| 37 | 5 | return 1; | |||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | 13 | 1; | |||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | __END__ | ||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | =pod | ||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | =encoding UTF-8 | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | =head1 NAME | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | Set::Associate::Utils - Shared Guts between Set::Associate modules | ||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | =head1 VERSION | ||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | version 0.004000 | ||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | =head1 AUTHOR | ||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||
| 58 | Kent Fredric <kentnl@cpan.org> | ||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | This software is copyright (c) 2015 by Kent Fredric <kentfredric@gmail.com>. | ||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||
| 64 | This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||||||||||
| 65 | the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||
| 67 | =cut | ||||||||||||||||||||||||||||