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

Sub::Prototype - Set a sub's prototype

Author

       Florian Ragwitz <rafl@debian.org>

Contributor

       Karen Etheridge <ether@cpan.org>

Functions

       This module only has one function, which is also exported by default:

   set_prototype(\&coderef,$prototype)
           set_prototype(\&some_function, '$$');

       Sets the prototype for "coderef" to $prototype.

Name

       Sub::Prototype - Set a sub's prototype

Support

       Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Sub-
       Prototype> (or bug-Sub-Prototype@rt.cpan.org <mailto:bug-Sub-Prototype@rt.cpan.org>).

Synopsis

           use Sub::Prototype;

           BEGIN {
               my $code = sub { ... };
               set_prototype($code, '&@');
               *main::my_func = $code;
           }

           my_func { ... } @list;

Thanks

       Shawn M Moore for the idea and tests.

Version

       version 0.03

See Also