« blib/lib/Class/MakeMethods/Standard/Hash.pm
↑ Summary
blib/lib/Class/MakeMethods/Emulator/Inheritable.pm »
| 1 | package Class::MakeMethods::Emulator::Singleton; | ||||||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 2 | require Class::MakeMethods::Emulator; | |||||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 2 | my $emulation_target = 'Class::Singleton'; | |||||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 2 | ▶ | sub import { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
import: called CC=7 SCAR=22.7
| |||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 2 | my $mm_class = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 10 | 2 | ▶ | if ( scalar @_ and $_[0] =~ /^-take_namespace/ and shift) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition66%4/6
scalar @_ and $_[0] =~ /^-take_namespace/ and shift()
scalar @_ and $_[0] =~ /^-take_namespace/
MC/DC33%1/3
scalar @_ and $_[0] =~ /^-take_namespace/ and shift()
scalar @_
$_[0] =~ /^-take_namespace/
shift()
Truth table50%2/4
A and B and C
A= scalar @_B= $_[0] =~ /^-take_namespace/C= shift()
| |||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 1 | Class::MakeMethods::Emulator::namespace_capture(__PACKAGE__, $emulation_target); | |||||||||||||||||||||||||||||||||||||||||||||
| 12 | ▶ | } elsif ( scalar @_ and $_[0] =~ /^-release_namespace/ and shift) { | |||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%2/6
scalar @_ and $_[0] =~ /^-release_namespace/ and shift()
scalar @_ and $_[0] =~ /^-release_namespace/
MC/DC0%0/3
scalar @_ and $_[0] =~ /^-release_namespace/ and shift()
scalar @_
$_[0] =~ /^-release_namespace/
shift()
Truth table25%1/4
A and B and C
A= scalar @_B= $_[0] =~ /^-release_namespace/C= shift()
| |||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 0 | Class::MakeMethods::Emulator::namespace_release(__PACKAGE__, $emulation_target); | |||||||||||||||||||||||||||||||||||||||||||||
| 14 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 15 | # The fallback should really be to NEXT::import. | ||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 2 | $mm_class->SUPER::import( @_ ); | |||||||||||||||||||||||||||||||||||||||||||||
| 17 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||||||
| 19 | ######################################################################## | ||||||||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 2 | ▶ | use Class::MakeMethods ( | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 2 | 'Template::Hash:new --with_values' => '_new_instance', | |||||||||||||||||||||||||||||||||||||||||||||
| 23 | 'Template::ClassVar:instance --get_init' => [ 'instance', | ||||||||||||||||||||||||||||||||||||||||||||||
| 24 | {new_method=>'_new_instance', variable=>'_instance'} ] | ||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 2 | ); | |||||||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||||||
| 27 | ######################################################################## | ||||||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||||||
| 31 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||