From: Vincent Pit Date: Thu, 28 Aug 2008 14:36:21 +0000 (+0200) Subject: Document opening of global filehandles in pragma scope X-Git-Tag: v0.02~3 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Fsubs-auto.git;a=commitdiff_plain;h=c31abfbd7888d62dabfd301cc5f7435d7897e63f Document opening of global filehandles in pragma scope --- diff --git a/lib/subs/auto.pm b/lib/subs/auto.pm index c5ef078..0625cc6 100644 --- a/lib/subs/auto.pm +++ b/lib/subs/auto.pm @@ -201,6 +201,8 @@ None. C<*{'::foo'}{CODE}> will appear as defined in a scope where the pragma is enabled, C is used as a bareword, but is never actually defined afterwards. This may or may not be considered as Doing The Right Thing. However, C<*{'::foo'}{CODE}> will always return the right value if you fetch it outside the pragma's scope. Actually, you can make it return the right value even in the pragma's scope by reading C<*{'::foo'}{CODE}> outside (or by actually defining C, which is ultimately why you use this pragma, right ?). +You have to open global filehandles outside of the scope of this pragma if you want them not to be treated as function calls. Or just use lexical filehandles and default ones as you should be. + =head1 DEPENDENCIES L 5.10.0.