| 1 | #line 1 | ||||||||||||||
| 2 | package Module::Install::Base; | ||||||||||||||
| 3 | 2 | ▶ | |||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 4 | 2 | ▶ | use strict 'vars'; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | 2 | ▶ | use vars qw{$VERSION}; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 6 | 2 | BEGIN { | |||||||||||||
| 7 | $VERSION = '1.04'; | ||||||||||||||
| 8 | } | ||||||||||||||
| 9 | |||||||||||||||
| 10 | 2 | ▶ | # Suspend handler for "redefined" warnings | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 11 | 2 | BEGIN { | |||||||||||||
| 12 | 2 | ▶ | my $w = $SIG{__WARN__}; | ||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||
| 13 | $SIG{__WARN__} = sub { $w }; | ||||||||||||||
| 14 | } | ||||||||||||||
| 15 | |||||||||||||||
| 16 | #line 42 | ||||||||||||||
| 17 | |||||||||||||||
| 18 | sub new { | ||||||||||||||
| 19 | my $class = shift; | ||||||||||||||
| 20 | unless ( defined &{"${class}::call"} ) { | ||||||||||||||
| 21 | *{"${class}::call"} = sub { shift->_top->call(@_) }; | ||||||||||||||
| 22 | } | ||||||||||||||
| 23 | unless ( defined &{"${class}::load"} ) { | ||||||||||||||
| 24 | *{"${class}::load"} = sub { shift->_top->load(@_) }; | ||||||||||||||
| 25 | } | ||||||||||||||
| 26 | bless { @_ }, $class; | ||||||||||||||
| 27 | } | ||||||||||||||
| 28 | |||||||||||||||
| 29 | #line 61 | ||||||||||||||
| 30 | |||||||||||||||
| 31 | sub AUTOLOAD { | ||||||||||||||
| 32 | local $@; | ||||||||||||||
| 33 | my $func = eval { shift->_top->autoload } or return; | ||||||||||||||
| 34 | goto &$func; | ||||||||||||||
| 35 | } | ||||||||||||||
| 36 | |||||||||||||||
| 37 | #line 75 | ||||||||||||||
| 38 | |||||||||||||||
| 39 | sub _top { | ||||||||||||||
| 40 | $_[0]->{_top}; | ||||||||||||||
| 41 | } | ||||||||||||||
| 42 | |||||||||||||||
| 43 | 2 | ▶ | #line 90 | ||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.3
Subroutine
new: called CC=3 SCAR=11.3
Pod
undocumented
Pod
undocumented
| |||||||||||||||
| 44 | 2 | ||||||||||||||
| 45 | 2 | ▶ | sub admin { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 46 | 0 | ▶ | $_[0]->_top->{admin} | ||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=0.4
Subroutine
__ANON__: not called CC=1 SCAR=0.4
| |||||||||||||||
| 47 | or | ||||||||||||||
| 48 | 2 | ▶ | Module::Install::Base::FakeAdmin->new; | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 49 | 0 | ▶ | } | ||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||
| 50 | |||||||||||||||
| 51 | 2 | #line 106 | |||||||||||||
| 52 | |||||||||||||||
| 53 | sub is_admin { | ||||||||||||||
| 54 | ! $_[0]->admin->isa('Module::Install::Base::FakeAdmin'); | ||||||||||||||
| 55 | } | ||||||||||||||
| 56 | |||||||||||||||
| 57 | sub DESTROY {} | ||||||||||||||
| 58 | |||||||||||||||
| 59 | package Module::Install::Base::FakeAdmin; | ||||||||||||||
| 60 | |||||||||||||||
| 61 | use vars qw{$VERSION}; | ||||||||||||||
| 62 | 50 | ▶ | BEGIN { | ||||||||||||
|
Subroutine
AUTOLOAD: called CC=2 SCAR=7.0
| |||||||||||||||
| 63 | 50 | $VERSION = $Module::Install::Base::VERSION; | |||||||||||||
| 64 | 50 | ▶ | } | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 65 | 50 | ||||||||||||||
| 66 | my $fake; | ||||||||||||||
| 67 | |||||||||||||||
| 68 | sub new { | ||||||||||||||
| 69 | $fake ||= bless(\@_, $_[0]); | ||||||||||||||
| 70 | } | ||||||||||||||
| 71 | |||||||||||||||
| 72 | sub AUTOLOAD {} | ||||||||||||||
| 73 | |||||||||||||||
| 74 | sub DESTROY {} | ||||||||||||||
| 75 | |||||||||||||||
| 76 | 68 | ▶ | # Restore warning handler | ||||||||||||
|
Subroutine
_top: called CC=1 SCAR=0.0
| |||||||||||||||
| 77 | 68 | BEGIN { | |||||||||||||
| 78 | $SIG{__WARN__} = $SIG{__WARN__}->(); | ||||||||||||||
| 79 | } | ||||||||||||||
| 80 | |||||||||||||||
| 81 | 1; | ||||||||||||||
| 82 | |||||||||||||||
| 83 | #line 159 | ||||||||||||||