]> git.vpit.fr Git - perl/modules/Sub-Op.git/blobdiff - lib/Sub/Op.pm
Test and document caveats about defining a sub whose name is handled in the current...
[perl/modules/Sub-Op.git] / lib / Sub / Op.pm
index 6b421c4be5a17f3f6b3a9a2f91e63386c48f53b5..e44ebcaa8afa9635d934cb09c68cd52b0d586e0c 100644 (file)
@@ -435,6 +435,11 @@ BEGIN { _monkeypatch() }
 
 See the F<t/Sub-Op-LexicalSub> directory that implements a complete example.
 
+=head1 CAVEATS
+
+Preexistent definitions of a sub whose name is handled by L<Sub::Op> 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<Sub::Op> with a name that is currently being replaced, the new declaration will be obliterated at the scope end.
+
 =head1 DEPENDENCIES
 
 L<perl> 5.10.