Sub::Prototype - Set a subs prototype
use Sub::Prototype; BEGIN { my $code = sub { ... }; set_prototype($code, '&@'); *main::my_func = $code; } my_func { ... } @list;
This module only has one function, which is also exported by default:
set_prototype(\&some_function, '$$');
Sets the prototype for coderef to $prototype.
coderef
$prototype
Shawn M Moore for the idea and tests.
Florian Ragwitz <rafl@debian.org>
Copyright (c) 2008 Florian Ragwitz
This module is free software.
It may distribute it under the same terms as perl itself.
To install Sub::Prototype, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sub::Prototype
CPAN shell
perl -MCPAN -e shell install Sub::Prototype
For more information on module installation, please visit the detailed CPAN module installation guide.