| 1 | package Mason::Component::Moose; ## no critic (Moose::RequireMakeImmutable) | ||
| 2 | 21 | $Mason::Component::Moose::VERSION = '2.24'; | |
| 3 | 21 | ▶ | use Moose (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 21 | ▶ | use MooseX::HasDefaults::RW (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 21 | ▶ | use Method::Signatures::Simple (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 21 | ▶ | use Moose::Exporter; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 21 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 21 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 21 | Moose::Exporter->setup_import_methods( also => ['Moose'] ); | |
| 10 | |||
| 11 | 229 | ▶ | sub init_meta { |
|
Subroutine
init_meta: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 12 | 229 | my $class = shift; | |
| 13 | 229 | my %params = @_; | |
| 14 | 229 | my $for_class = $params{for_class}; | |
| 15 | 229 | Method::Signatures::Simple->import( into => $for_class ); | |
| 16 | 229 | MooseX::HasDefaults::RW->import( { into => $for_class } ); | |
| 17 | { | ||
| 18 | 21 | ▶ | no strict 'refs'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | 229 | my $temp = $for_class; | |
| 20 | 0 | ▶ | *{ $for_class . '::CLASS' } = sub () { $temp }; # like CLASS.pm |
|
Subroutine
__ANON__: not called CC=1 SCAR=0.4
| |||
| 21 | 229 | *{ $for_class . '::CLASS' } = \$for_class; | |
| 22 | } | ||
| 23 | } | ||
| 24 | |||
| 25 | 21 | 1; | |
| 26 | |||
| 27 | __END__ | ||