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

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

Thread Previous
From:
Father Chrysostomos via RT
Date:
June 23, 2016 19:54
Subject:
[perl #128466] perl debugger magic comarison does not work sometimes
Message ID:
rt-4.0.18-11702-1466711630-1976.128466-15-0@perl.org
On Thu Jun 23 09:25:22 2016, kes-kes@yandex.ru wrote:
> The documentations says:
> http://perldoc.perl.org/perldebguts.html#Debugger-Internals
> 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/DebugHooks.pm line 589, <> line 6.

etc.

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
https://rt.perl.org/Ticket/Display.html?id=128466

Thread Previous


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