use Moose;
has 'callback' => (
- traits => ['Code'],
- is => 'ro',
- isa => 'CodeRef',
- default => sub { sub { print "called" } },
- handles => {
+ traits => ['Code'],
+ is => 'ro',
+ isa => 'CodeRef',
+ default => sub {
+ sub { print "called" }
+ },
+ handles => {
call => 'execute',
},
);
my $foo = Foo->new;
- $foo->call; # prints "called"
-
+ $foo->call; # prints "called"
=head1 DESCRIPTION
=over 4
-=item B<execute(@args)>
+=item * B<execute(@args)>
Calls the coderef with the given args.
-=item B<execute_method(@args)>
+=item * B<execute_method(@args)>
Calls the coderef with the the instance as invocant and given args.
=back
-=head1 METHODS
-
-=over 4
-
-=item B<meta>
-
-=back
-
=head1 BUGS
See L<Moose/BUGS> for details on reporting bugs.