« blib/lib/Class/MakeMethods/Composite/Universal.pm
↑ Summary
blib/lib/Class/MakeMethods/Template/ClassInherit.pm »
| 1 | package Class::MakeMethods::Emulator::mcoder; | ||||||||||
| 2 | |||||||||||
| 3 | 3 | $VERSION = '0.05'; | |||||||||
| 4 | |||||||||||
| 5 | 3 | ▶ | use Class::MakeMethods::Emulator '-isasubclass'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 3 | ▶ | use Class::MakeMethods::Template '-isasubclass'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | ######################################################################## | ||||||||||
| 9 | |||||||||||
| 10 | 7 | ▶ | sub import { | ||||||||
|
Subroutine
import: called CC=3 SCAR=11.0
| |||||||||||
| 11 | 7 | my $class = shift; | |||||||||
| 12 | 7 | ( my $target = $class ) =~ s/^Class::MakeMethods::Emulator:://; | |||||||||
| 13 | 7 | ▶ | $class->_handle_namespace( $target, $_[0] ) and shift; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 7 | ▶ | $class->make( @_ ) if ( scalar @_ ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | |||||||||||
| 18 | 3 | ▶ | sub new { 'Template::Hash::new --with_values' } | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 19 | 2 | ▶ | sub proxy { 'Template::Universal:forward_methods -target' } | ||||||||
|
Subroutine
proxy: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 20 | 2 | ▶ | sub generic { { '-import' => { 'Template::Hash:scalar' => '*' } } } | ||||||||
|
Subroutine
generic: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 21 | 2 | ▶ | sub get { { interface => { default => { '*' =>'get' } } } } | ||||||||
|
Subroutine
get: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 22 | 2 | ▶ | sub set { { interface => { default => { 'set_*' =>'set' } } } } | ||||||||
|
Subroutine
set: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 23 | 1 | ▶ | sub undef { { interface => { default => { 'undef_*' =>'clear' } } } } | ||||||||
|
Subroutine
undef: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 24 | 1 | ▶ | sub delete { { interface => { default => { 'delete_*'=>'hash_delete' } } } } | ||||||||
|
Subroutine
delete: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 25 | 1 | ▶ | sub bool_set { { interface => { default => { 'set_*' =>'set_value' } }, | ||||||||
|
Subroutine
bool_set: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 26 | '-import' => { 'Template::Hash:boolean' => '*' } } } | ||||||||||
| 27 | 1 | ▶ | sub bool_unset { { interface => { default => { 'unset_*' =>'clear' } } } } | ||||||||
|
Subroutine
bool_unset: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 28 | 1 | ▶ | sub calculated { { interface => { default => { '*' =>'get_init' } }, | ||||||||
|
Subroutine
calculated: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 29 | params => { init_method=>'_calculate_*' } } } | ||||||||||
| 30 | |||||||||||
| 31 | ######################################################################## | ||||||||||
| 32 | |||||||||||
| 33 | 3 | foreach my $type ( qw( new get set proxy calculated ) ) { | |||||||||
| 34 | $INC{"Class/MakeMethods/Emulator/mcoder/$type.pm"} = | ||||||||||
| 35 | 15 | $INC{"mcoder/$type.pm"} = __FILE__; | |||||||||
| 36 | 15 | ▶ | *{__PACKAGE__ . "::${type}::import"} = sub { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.2
| |||||||||||
| 37 | 3 | ▶ | (shift) and (__PACKAGE__)->make( $type => [ @_ ] ) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 38 | 15 | }; | |||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | ######################################################################## | ||||||||||
| 42 | |||||||||||
| 43 | 3 | 1; | |||||||||
| 44 | |||||||||||
| 45 | __END__ | ||||||||||