« blib/lib/Class/MakeMethods/Evaled/Hash.pm
↑ Summary
blib/lib/Class/MakeMethods/Template/Class.pm »
| 1 | package Class::MakeMethods::Emulator::AccessorFast; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use Class::MakeMethods::Composite::Hash; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use Class::MakeMethods::Emulator '-isasubclass'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | ▶ | sub _emulator_target { 'Class::Accessor::Fast' } | ||||||||
|
Subroutine
_emulator_target: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | sub import { | ||||||||
|
Subroutine
import: called CC=2 SCAR=7.2
| |||||||||||
| 10 | 1 | my $class = shift; | |||||||||
| 11 | 1 | ▶ | $class->_handle_namespace( $class->_emulator_target, $_[0] ) and shift; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 12 | } | ||||||||||
| 13 | |||||||||||
| 14 | ######################################################################## | ||||||||||
| 15 | |||||||||||
| 16 | 2 | ▶ | sub mk_accessors { | ||||||||
|
Subroutine
mk_accessors: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 17 | Class::MakeMethods::Composite::Hash->make( | ||||||||||
| 18 | -TargetClass => (shift), | ||||||||||
| 19 | 'new' => { name => 'new', modifier => 'with_values' }, | ||||||||||
| 20 | 'scalar' => [ map { | ||||||||||
| 21 | 2 | $_, | |||||||||
| 22 | "_${_}_accessor", { 'hash_key' => $_ } | ||||||||||
| 23 | } @_ ], | ||||||||||
| 24 | ); | ||||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 1 | ▶ | sub mk_ro_accessors { | ||||||||
|
Subroutine
mk_ro_accessors: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 28 | Class::MakeMethods::Composite::Hash->make( | ||||||||||
| 29 | -TargetClass => (shift), | ||||||||||
| 30 | 'new' => { name => 'new', modifier => 'with_values' }, | ||||||||||
| 31 | 'scalar' => [ map { | ||||||||||
| 32 | 1 | $_, { permit => 'ro' }, | |||||||||
| 33 | "_${_}_accessor", { 'hash_key' => $_, permit => 'ro' } | ||||||||||
| 34 | } @_ ], | ||||||||||
| 35 | ); | ||||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | 1 | ▶ | sub mk_wo_accessors { | ||||||||
|
Subroutine
mk_wo_accessors: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 39 | Class::MakeMethods::Composite::Hash->make( | ||||||||||
| 40 | -TargetClass => (shift), | ||||||||||
| 41 | 'new' => { name => 'new', modifier => 'with_values' }, | ||||||||||
| 42 | 'scalar' => [ map { | ||||||||||
| 43 | 1 | $_, { permit => 'wo' }, | |||||||||
| 44 | "_${_}_accessor", { 'hash_key' => $_, permit => 'wo' } | ||||||||||
| 45 | } @_ ], | ||||||||||
| 46 | ); | ||||||||||
| 47 | } | ||||||||||
| 48 | |||||||||||
| 49 | ######################################################################## | ||||||||||
| 50 | |||||||||||
| 51 | 1 | 1; | |||||||||
| 52 | |||||||||||
| 53 | __END__ | ||||||||||