Centos 5 with Perl 5.10.0 ConfigDefs.pl "strict refs" error
Nathan Olson
naolson at gmail.com
Mon Jan 7 20:48:57 GMT 2008
Perhaps related to this change from 5.10.
strictures and dereferencing in defined()
use strict 'refs' was ignoring taking a hard reference in an argument
to defined(), as in :
use strict 'refs';
my $x = 'foo';
if (defined $$x) {...}
This now correctly produces the run-time error Can't use string as a
SCALAR ref while "strict refs" in use.
defined @$foo and defined %$bar are now also subject to strict 'refs'
(that is, $foo and $bar shall be proper references there.)
(defined(@foo) and defined(%bar) are discouraged constructs anyway.)
(Nicholas Clark)
More information about the MailScanner
mailing list