X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FSub%2FOp.pm;h=1c783f6fa3504399522cc4dfb27ca20476b3517e;hb=abd480ecd0ecf811f442448f74cf0afaa7997a77;hp=c075bbb8612aae2b8fe7502139a8ad8419116341;hpb=a3c83d0adc138681da18079c268948d2fe9326d7;p=perl%2Fmodules%2FSub-Op.git diff --git a/lib/Sub/Op.pm b/lib/Sub/Op.pm index c075bbb..1c783f6 100644 --- a/lib/Sub/Op.pm +++ b/lib/Sub/Op.pm @@ -50,11 +50,11 @@ In your XS file : BOOT: { sub_op_config_t c; - c.name = "reftype"; - c.len = sizeof("reftype")-1; - c.pp = scalar_util_reftype; - c.check = 0; - c.ud = NULL; + c.name = "reftype"; + c.namelen = sizeof("reftype")-1; + c.pp = scalar_util_reftype; + c.check = 0; + c.ud = NULL; sub_op_register(aTHX_ &c); } @@ -215,7 +215,7 @@ Allowed to be static. =item * -C +C C's length, in bytes. @@ -435,6 +435,14 @@ BEGIN { _monkeypatch() } See the F directory that implements a complete example. +=head1 CAVEATS + +Preexistent definitions of a sub whose name is handled by L are restored at the end of the lexical scope in which the module is used. +But if you define a sub in the scope of action of L with a name that is currently being replaced, the new declaration will be obliterated at the scope end. + +Function calls without parenthesis inside an C in the scope of the pragma won't be replaced. +I know a few ways of fixing this, but I've not yet decided on which. + =head1 DEPENDENCIES L 5.10.