develooper Front page | perl.perl5.porters | Postings from June 2016

[perl #128466] perl debugger magic comarison does not work sometimes

Thread Previous
Father Chrysostomos via RT
June 23, 2016 19:54
[perl #128466] perl debugger magic comarison does not work sometimes
Message ID:
On Thu Jun 23 09:25:22 2016, wrote:
> The documentations says:
> Values in this array are magical in numeric context: they compare
> equal to zero only if the line is
> not breakable.
> But that is not true.

> How to reproduce:
... skipped lots of stuff ...
> Argument "BEGIN{\n" isn't numeric in numeric ne (!=) at
> /home/kes/perl5/perlbrew/perls/perl-
> 5.24.0/lib/site_perl/5.24.0/Devel/ line 589, <> line 6.


It seems that the array of source lines (@{"_<$filename"}) does not have a numeric value for unbreakable lines.  That means that you get a non-numeric warning.  Nevertheless, it still compares equal to 0 numerically, so technically the documentation is correct.

I’m not saying something shouldn’t be fixed.  Maybe it’s the documentation that needs clarification.


Father Chrysostomos

via perlbug:  queue: perl5 status: new

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About