X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FSub%2FOp.pm;h=8b7325658143c7f5ac1763b84c11c8a5649ea813;hb=50984c4a3e39b187b5b52ceeba826bc819d23564;hp=6b421c4be5a17f3f6b3a9a2f91e63386c48f53b5;hpb=a0c0873977f66d8024a988b8dbd8e1c092927189;p=perl%2Fmodules%2FSub-Op.git diff --git a/lib/Sub/Op.pm b/lib/Sub/Op.pm index 6b421c4..8b73256 100644 --- a/lib/Sub/Op.pm +++ b/lib/Sub/Op.pm @@ -11,7 +11,7 @@ Sub::Op - Install subroutines as opcodes. =head1 VERSION -Version 0.01 +Version 0.02 =cut @@ -20,7 +20,7 @@ our ($VERSION, @ISA); sub dl_load_flags { 0x01 } BEGIN { - $VERSION = '0.01'; + $VERSION = '0.02'; require DynaLoader; push @ISA, 'DynaLoader'; __PACKAGE__->bootstrap($VERSION); @@ -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.