retitle 201539 defined(@array) warning isn't triggered for globals
severity 201539 minor
found 201539 5.10.0-8
thanks

On Wed, Jul 16, 2003 at 12:31:34PM +0200, Roland Illig wrote:
> Package: perl
> Version: 5.8.0-18
> Severity: normal
> Tags: upstream
> 
> Perl should warn about the deprecated usage of this:
> 
> @i=();
> if(defined(@i)) {
>       print "foo\n";
> }

It does (and always did) for lexicals:

% perl -w -e 'my @i=(); if(defined(@i)) { print "foo\n"; }'   
defined(@array) is deprecated at -e line 1.
    (Maybe you should just omit the defined()?)

Apparently the same isn't true for global variables for some reason.
This is still the case for 5.10.0. I think 'normal' is an overrated
severity for this, so downgrading.

Cheers,
-- 
Niko Tyni   [EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to