Sub::Prototype(3)
π NAME π
Sub::Prototype β Set a sub's prototype. This is the Sub::Prototype(3) manual page, bestie, and it's lowkey iconic β¨
πΈ VERSION πΈ
version 0.03
π SYNOPSIS π
use Sub::Prototype;
BEGIN {
my $code = sub { ... };
set_prototype($code, '&@');
*main::my_func = $code;
}
my_func { ... } @list;
π¦ FUNCTIONS π¦
Okay so this module only has one function, and it's also exported by default:
π
set_prototype(\&coderef, $prototype) π
set_prototype(\&some_function, '$$');
Sets the prototype for coderef to $prototype. Slay π
π THANKS π
Shawn M Moore for the idea and tests. King behavior, fr fr π
π«Ά 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>).
β AUTHOR β
Florian Ragwitz <rafl@debian.org>
π CONTRIBUTOR π
Karen Etheridge <ether@cpan.org>
π 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.
β that's the whole page, bestie π«Ά source/version: perl v5.42.2 Β· date: 2026-02-15 π
π¦ where this page comes from
- alpine 3.24: perl-sub-prototype-doc 0.03-r3 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms