NAME

Sub::HandlesVia::HandlerLibrary::Code - library of Code-related methods

SYNOPSIS

package My::Class {
  use Moo;
  use Sub::HandlesVia;
  use Types::Standard 'CodeRef';
  has my_code => (
    is => 'ro',
    isa => CodeRef,
    handles_via => 'Code',
    handles => {
      'my_execute' => 'execute',
      'my_execute_method' => 'execute_method',
    },
  );
}

DESCRIPTION

This is a library of methods for Sub::HandlesVia.

DELEGATABLE METHODS

execute( @args )

Calls the coderef, passing it any arguments.

execute_method( @args )

Calls the coderef as if it were a method, passing any arguments.

BUGS

Please report any bugs to https://github.com/tobyink/p5-sub-handlesvia/issues.

SEE ALSO

Sub::HandlesVia.

AUTHOR

Toby Inkster <tobyink@cpan.org>.

COPYRIGHT AND LICENCE

This software is copyright (c) 2020, 2022 by Toby Inkster.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

DISCLAIMER OF WARRANTIES

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.