CC: | sprout [...] cpan.org |
Subject: | Lvalue fixes in bleadperl reveal precedence bug in DJZORT/Net-DHCP-0.67_1.tar.gz |
Since commit v5.15.6-179-gda1dff9 perl complains about this line 43 in
Net::DHCP::Packet (some whitespace omitted to get it on one line):
exists($args{Htype})?$self->htype($args{Htype}) : $self->{htype}=1;
Can't modify non-lvalue subroutine call at
/tmp/loop_over_bdir-XsCq11/Net-DHCP-0.67_1-UnPfM3/blib/lib/Net/DHCP/Packet.pm
line 43.
This looks to me like a precedence bug in line 43 that was simply
swallowed by perl so far. I suppose the code wants to add parentheses
around the assignment on the right.
exists($args{Htype})?$self->htype($args{Htype}) : ($self->{htype}=1);
I'm wondering how frequent this mistake is.
HTH && Regards,