logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Data::Perl::Role::Code - Wrapping class for Perl coderefs.

Author

       Matthew Phillips <mattp@cpan.org>

Description

       This class provides a wrapper and methods for interacting with Perl coderefs.

Name

       Data::Perl::Role::Code - Wrapping class for Perl coderefs.

Provided Methods

new($coderef)
           Constructs a new Data::Perl::Code object, initialized to $coderef as passed in, and returns it.

       execute(@args)
           Calls the coderef with the given args.

       execute_method(@args)
           Calls  the  coderef  with the the instance as invocant and given args. Thisiscurrentlydisabledandtriggersadieduetoimplementationdetailsyettoberesolved.

See Also

       •   Data::Perl

       •   MooX::HandlesVia

Synopsis

         use Data::Perl qw/code/;

         my $code = code(sub { 'Foo'} );

         $code->execute(); # returns 'Foo';

Version

       version 0.002011

See Also