X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FSub-Prototype-Util.git;a=blobdiff_plain;f=README;h=915c7892431054b6ac34706ce98f6e75e0dd6add;hp=2971b31c9f02803257832191dfff9722047720c0;hb=29d3a214c70390edd665985eddfb42ff7e29a02a;hpb=28776527078c17a920f14823ef039503f08dc4d7 diff --git a/README b/README index 2971b31..915c789 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME Sub::Prototype::Util - Prototype-related utility routines. VERSION - Version 0.04 + Version 0.05 SYNOPSIS use Sub::Prototype::Util qw/flatten recall/; @@ -40,6 +40,18 @@ FUNCTIONS 3". This is especially needed for core functions because you can't "goto" into them. + You can also force the use of a specific prototype. In this case, $name + must be a hash reference that holds exactly one key/value pair, the key + being the function name and the value the prototpye that should be used + to call it. + + recall { 'CORE::push' => '\@$' }, $a, 1, 2, 3; # will only push 1 + + This allows you to recall into "CORE::grep" and "CORE::map" by using the + "\&@" prototype : + + sub mygrep (&@) { recall { 'CORE::grep' => '\&@' }, @_ } # the prototypes are intentionally different + EXPORT The functions "flatten" and "recall" are only exported on request, either by providing their name or by the ':funcs' and ':all' tags.