Manpage logo

Sub::Prototype - Set a sub's prototype

NAME  VERSION  SYNOPSIS  FUNCTIONS  set_prototype(\&coderef, $prototype)  THANKS  SUPPORT  AUTHOR  CONTRIBUTOR  COPYRIGHT AND LICENCE 

NAME

Sub::Prototype − Set a sub's prototype

VERSION

version 0.03

SYNOPSIS

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

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.

THANKS

Shawn M Moore for the idea and tests.

SUPPORT

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

AUTHOR

Florian Ragwitz <[email protected]>

CONTRIBUTOR

Karen Etheridge <[email protected]>

COPYRIGHT AND LICENCE

This software is copyright (c) 2008 by Florian Ragwitz.

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


Updated 2026-06-01 - jenkler.se | uex.se