1 package Moose::Meta::Attribute::Native::Trait::Code;
4 with 'Moose::Meta::Attribute::Native::Trait';
6 sub _helper_type { 'CodeRef' }
12 # ABSTRACT: Helper trait for CodeRef attributes
28 sub { print "called" }
36 $foo->call; # prints "called"
40 This trait provides native delegation methods for code references.
44 If you don't provide an C<isa> value for your attribute, it will default to
47 =head1 PROVIDED METHODS
51 =item * B<execute(@args)>
53 Calls the coderef with the given args.
55 =item * B<execute_method(@args)>
57 Calls the coderef with the the instance as invocant and given args.
63 See L<Moose/BUGS> for details on reporting bugs.