« /usr/local/lib/perl5/site_perl/5.44.0/Moo/_Utils.pm
↑ Summary
/usr/local/lib/perl5/5.44.0/overload.pm »
| 1 | package parent; | ||||||||||||||||||||||||||||
| 2 | use strict; | ||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||
| 4 | our $VERSION = '0.244'; | ||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | sub import { | ||||||||||||||||||||||||||||
| 7 | 0 | ▶ | my $class = shift; | ||||||||||||||||||||||||||
|
Subroutine
import: not called CC=4 SCAR=30.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 0 | my $inheritor = caller(0); | |||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 0 | ▶ | if ( @_ and $_[0] eq '-norequire' ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
@_ and $_[0] eq "-norequire"
MC/DC0%0/2
@_ and $_[0] eq "-norequire"
@_
$_[0] eq "-norequire"
Truth table0%0/3
A and B
A= @_B= $_[0] eq "-norequire"
| |||||||||||||||||||||||||||||
| 12 | 0 | shift @_; | |||||||||||||||||||||||||||
| 13 | } else { | ||||||||||||||||||||||||||||
| 14 | 0 | for ( my @filename = @_ ) { | |||||||||||||||||||||||||||
| 15 | 0 | local @_; # protect us against the loaded module changing @_ | |||||||||||||||||||||||||||
| 16 | 0 | s{::|'}{/}g; | |||||||||||||||||||||||||||
| 17 | 0 | require "$_.pm"; # dies if the file is not found | |||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | { | ||||||||||||||||||||||||||||
| 22 | 0 | no strict 'refs'; | |||||||||||||||||||||||||||
| 23 | 0 | push @{"$inheritor\::ISA"}, @_; # dies if a loop is detected | |||||||||||||||||||||||||||
| 24 | }; | ||||||||||||||||||||||||||||
| 25 | }; | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 1; | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | __END__ | ||||||||||||||||||||||||||||