1Sub::Prototype(3)     User Contributed Perl Documentation    Sub::Prototype(3)
2
3
4

NAME

6       Sub::Prototype - Set a subs prototype
7

SYNOPSIS

9           use Sub::Prototype;
10
11           BEGIN {
12               my $code = sub { ... };
13               set_prototype($code, '&@');
14               *main::my_func = $code;
15           }
16
17           my_func { ... } @list;
18

FUNCTIONS

20       This module only has one function, which is also exported by default:
21
22   set_prototype(\&coderef, $prototype)
23           set_prototype(\&some_function, '$$');
24
25       Sets the prototype for "coderef" to $prototype.
26

THANKS

28       Shawn M Moore for the idea and tests.
29

AUTHOR

31       Florian Ragwitz <rafl@debian.org>
32
34       Copyright (c) 2008  Florian Ragwitz
35
36       This module is free software.
37
38       It may distribute it under the same terms as perl itself.
39
40
41
42perl v5.12.0                      2008-11-11                 Sub::Prototype(3)
Impressum