| 1 | package Forest::Tree::Builder::Callback; | ||
| 2 | 10 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | 10 | our $VERSION = '0.10'; | |
| 5 | 10 | our $AUTHORITY = 'cpan:STEVAN'; | |
| 6 | |||
| 7 | 10 | with 'Forest::Tree::Builder' => { -excludes => [qw(create_new_subtree)] }; | |
| 8 | |||
| 9 | 10 | has new_subtree_callback => ( | |
| 10 | isa => "CodeRef|Str", | ||
| 11 | is => "ro", | ||
| 12 | required => 1, | ||
| 13 | default => "Forest::Tree::Constructor::create_new_subtree", | ||
| 14 | ); | ||
| 15 | |||
| 16 | 76 | ▶ | sub create_new_subtree { |
|
Subroutine
create_new_subtree: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 17 | 76 | my ( $self, @args ) = @_; | |
| 18 | |||
| 19 | 76 | my $method = $self->new_subtree_callback; | |
| 20 | |||
| 21 | 76 | $self->$method(@args); | |
| 22 | } | ||
| 23 | |||
| 24 | 10 | ▶ | no Moose::Role; 1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 25 | |||
| 26 | __END__ | ||