1Data::Perl::Role::Code(U3s)er Contributed Perl DocumentatDiaotna::Perl::Role::Code(3)
2
3
4

NAME

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

VERSION

9       version 0.002009
10

SYNOPSIS

12         use Data::Perl qw/code/;
13
14         my $code = code(sub { 'Foo'} );
15
16         $code->execute(); # returns 'Foo';
17

DESCRIPTION

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

PROVIDED METHODS

23       new($coderef)
24           Constructs a new Data::Perl::Code object, initialized to $coderef
25           as passed in, and returns it.
26
27       execute(@args)
28           Calls the coderef with the given args.
29
30       execute_method(@args)
31           Calls the coderef with the the instance as invocant and given args.
32           This is currently disabled and triggers a die due to implementation
33           details yet to be resolved.
34

SEE ALSO

36       ·   Data::Perl
37
38       ·   MooX::HandlesVia
39

AUTHOR

41       Matthew Phillips <mattp@cpan.org>
42
44       This software is copyright (c) 2014 by Matthew Phillips
45       <mattp@cpan.org>.
46
47       This is free software; you can redistribute it and/or modify it under
48       the same terms as the Perl 5 programming language system itself.
49
50
51
52perl v5.30.0                      2019-07-26         Data::Perl::Role::Code(3)
Impressum