1 package Moose::Meta::Attribute::Native::Trait::Code;
4 our $AUTHORITY = 'cpan:STEVAN';
6 with 'Moose::Meta::Attribute::Native::Trait';
8 sub _helper_type { 'CodeRef' }
26 sub { print "called" }
34 $foo->call; # prints "called"
38 This trait provides native delegation methods for code references.
42 If you don't provide an C<isa> value for your attribute, it will default to
45 =head1 PROVIDED METHODS
49 =item * B<execute(@args)>
51 Calls the coderef with the given args.
53 =item * B<execute_method(@args)>
55 Calls the coderef with the the instance as invocant and given args.
61 See L<Moose/BUGS> for details on reporting bugs.