File: README

package info (click to toggle)
libsub-prototype-perl 0.02-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 148 kB
  • sloc: perl: 1,090; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 737 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
NAME
    Sub::Prototype - Set a subs prototype

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.

AUTHOR
    Florian Ragwitz <rafl@debian.org>

COPYRIGHT AND LICENSE
    Copyright (c) 2008 Florian Ragwitz

    This module is free software.

    It may distribute it under the same terms as perl itself.