From: Nicholas Clark Date: Mon, 18 Dec 2006 22:12:36 +0000 (+0000) Subject: Making strict et al propagate into autoloaded subroutines seems a X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=801de10ef663bd7b3ee68821109e12178694162c;p=p5sagit%2Fp5-mst-13.2.git Making strict et al propagate into autoloaded subroutines seems a worthy todo. p4raw-id: //depot/perl@29588 --- diff --git a/pod/perltodo.pod b/pod/perltodo.pod index e7dd252..a68e5b0 100644 --- a/pod/perltodo.pod +++ b/pod/perltodo.pod @@ -141,6 +141,23 @@ when is duplicated in F. Writing things twice is bad, m'kay. It would be good to teach C to understand the conditional compilation, and hence remove the duplication, and the mistakes it has caused. +=head2 use strict; and AutoLoad + +Currently if you write + + package Whack; + use AutoLoader 'AUTOLOAD'; + use strict; + 1; + __END__ + sub bloop { + print join (' ', No, strict, here), "!\n"; + } + +then C isn't in force within the autoloaded subroutines. It would +be more consistent (and less surprising) to arrange for all lexical pragmas +in force at the __END__ block to be in force within each autoloaded subroutine. + =head1 Tasks that need a little sysadmin-type knowledge Or if you prefer, tasks that you would learn from, and broaden your skills