Bug#712287: please say exactly which item it conks out on

Damyan Ivanov dmn at debian.org
Sat Jun 15 06:43:33 UTC 2013


-=| jidanni at jidanni.org, 15.06.2013 06:44:35 +0800 |=-
> Package: perl
> Version: 5.14.2-20
> Severity: wishlist
> 
> I am curious how many hours are wasted on this planet in total by perl
> not revealing just which item it is talking about in
> 
> Use of uninitialized value in concatenation (.) or string at ./s 
> line 388.

It does some times:

  $ perl -we'my $s; print "$s\n"'
  Use of uninitialized value $s in concatenation (.) or string at -e 
  line 1.

  $ perl -we'my $s; print "$s{t}\n"'
  Use of uninitialized value $s{"t"} in concatenation (.) or string at 
  -e line 1.

It is not so specific when the undefined value is a result of 
a function call:

  $ perl -we'sub u { undef } print u()."\n"'
  Use of uninitialized value in concatenation (.) or string at -e line 
  1.

I guess it is not so easy/appropriate to track where the undefined 
value comes from in this case. If you want to do the tracking 
yourself, you can never use concatenation of function return values, 
but assign them to scalars and concatenate them :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20130615/4704b721/attachment.sig>


More information about the Perl-maintainers mailing list