develooper Front page | perl.perl5.porters | Postings from October 2005

[perl #36875] Certain string handling functions don't warn on undef

From:
Steve Peters via RT
Date:
October 5, 2005 20:54
Subject:
[perl #36875] Certain string handling functions don't warn on undef
Message ID:
rt-3.0.11-36875-122241.14.9207383806553@perl.org
> [tassilo.von.parseval@rwth-aachen.de - Thu Aug 11 23:04:35 2005]:
> 
> 
> This is a bug report for perl from tassilo.von.parseval@rwth-
>    aachen.de,
> generated with the help of perlbug 1.35 running under perl v5.8.4.
> 
> 
> -----------------------------------------------------------------
> [Please enter your report here]
> 
> It appears that perl (any perl between 5.5.4 and 5.9.3) wont always
>    warn when
> an undefined value is used as an argument:
> 
>     perl -we 'print lc(undef)'
> 
> There will be no uninitialized-value-warning with (at least)
>    (lc|uc)(_first)?
> and reverse in scalar context.
> 
> If this is intentional behaviour then I see no mentioning of it in the
> documentation. From a cursory glance at the source it looks as if the
>    wrong
> version of one of the many SvPV_* macros is used.
> 
> I'll investigate further if it's agreed on that this is in fact a bug.
> 

I also agree that this is a bug.  I do have a preliminary patch to fix
this, but I received several warnings from EU::MM when building at least
one module.  I need to investigate this further before applying my patch.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About