|
NAMEMouseX::NativeTraits::CodeRef - Helper trait for CodeRef attributesSYNOPSISpackage Foo; use Mouse; has 'callback' => ( traits => ['Code'], is => 'ro', isa => 'CodeRef', default => sub { sub { print "called" } }, handles => { call => 'execute', }, ); my $foo = Foo->new; $foo->call; # prints "called" DESCRIPTIONThis provides operations on coderef attributes.PROVIDED METHODS
METHODS
SEE ALSOMouseX::NativeTraits
Visit the GSP FreeBSD Man Page Interface. |