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>


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