| 1 | package MouseX::NativeTraits::MethodProvider::CodeRef; | ||
| 2 | 2 | ▶ | use Mouse; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | 1 | extends qw(MouseX::NativeTraits::MethodProvider); | |
| 5 | |||
| 6 | 4 | ▶ | sub generate_execute { |
|
Subroutine
generate_execute: called CC=1 SCAR=0.0
Pod
documented
| |||
| 7 | 4 | my($self) = @_; | |
| 8 | 4 | my $reader = $self->reader; | |
| 9 | |||
| 10 | 12 | ▶ | return sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 11 | 12 | my ($instance, @args) = @_; | |
| 12 | 12 | $reader->($instance)->(@args); | |
| 13 | 4 | }; | |
| 14 | } | ||
| 15 | |||
| 16 | 2 | ▶ | sub generate_execute_method { |
|
Subroutine
generate_execute_method: called CC=1 SCAR=0.2
Pod
documented
| |||
| 17 | 2 | my($self) = @_; | |
| 18 | 2 | my $reader = $self->reader; | |
| 19 | |||
| 20 | 0 | ▶ | return sub { |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
Subroutine
invoke_method_callback: called CC=1 SCAR=1.2
| |||
| 21 | 0 | my ($instance, @args) = @_; | |
| 22 | 0 | $reader->($instance)->($instance, @args); | |
| 23 | 2 | }; | |
| 24 | } | ||
| 25 | |||
| 26 | 2 | ▶ | no Mouse; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 27 | 1 | __PACKAGE__->meta->make_immutable(); | |
| 28 | |||
| 29 | __END__ | ||