On Fri, Jan 01, 2010 at 08:02:19PM -0500, Eric Brine wrote:
> I realize that, but it doesn't explain the difference between
>
> >perl -lw
> my %h = map {
> my $x;
> (undef, undef)
> } 1;
> ^Z
> Use of uninitialized value in list assignment at - line 2.
>
> and
>
> >perl -lw
> my %h = (
>
> (undef, undef)
> );
> ^Z
> Use of uninitialized value in list assignment at - line 1.
>
> The assignment didn't move, so why did the warning?
Because perl's line number reporting is totally borked and needs ripping
out and rewriting from scratch. The line number that is reported is based
on what is stored in what happens to have been last nextstate op to have
been executed, and there isn't even a guarantee that the value in that op
corresponds to the line number where the statement boundary occurred.
--
Standards (n). Battle insignia or tribal totems.
Thread Previous
|
Thread Next