Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Path-Class CPAN distribution.

Maintainer(s)' notes

I prefer that bugs & patches are filed on GitHub rather than on RT: https://github.com/kenahoo/Path-Class/issues. Thanks.

Report information
The Basics
Id: 77259
Status: open
Priority: 0/
Queue: Path-Class

People
Owner: Nobody in particular
Requestors: scottie313 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.25
Fixed in: (no value)



Subject: Operation "eq": no method found when debugging
When I run my script in debugging mode in "Komodo IDE 7", I get the following error: ------------->8------------- Operation "eq": no method found, left argument in overloaded package Path::Class::Dir, right argument has no overloaded magic at D:/dev/pl/lib/Path/Class/Dir.pm line 32. ------------->8------------- If the above error occurs, the debugging suddenly stops. ---- My Perl version: D:\dev\pl>perl -V Summary of my perl5 (revision 5 version 14 subversion 2) configuration: Platform: osname=MSWin32, osvers=5.2, archname=MSWin32-x86-multi-thread (...) Locally applied patches: ActivePerl Build 1402 [295342] Built under MSWin32 Compiled at Oct 7 2011 15:49:44 @INC: D:/Perl/site/lib D:/Perl/lib .
Can you post the code that causes this error?
From: Scottie
On Thu May 17 10:30:25 2012, KWILLIAMS wrote: Show quoted text
> Can you post the code that causes this error?
Any code from: http://stackoverflow.com/questions/10606685 Best regards, Scottie
On Thu May 17 12:05:07 2012, Sc0ttie wrote: Show quoted text
I mean a small actual test case that shows the problem. The code in that Stack Overflow question seems to work fine, since it's generating output and not dying.
From: scottie313 [...] gmail.com
On Thu May 17 12:15:07 2012, KWILLIAMS wrote: Show quoted text
> On Thu May 17 12:05:07 2012, Sc0ttie wrote: > > I mean a small actual test case that shows the problem. The code in that > Stack Overflow question seems to work fine, since it's generating output > and not dying.
Yes, run the code works correctly, but debugging crashes. I made a screencast for you. It's available on following links: - http://youtu.be/8ZPo6v7L8Kg or - https://docs.google.com/open?id=0B5h6wpurkllBcEh2Q3dqSHl0NHM
On Fri May 18 03:42:21 2012, Scottie wrote: Show quoted text
> On Thu May 17 12:15:07 2012, KWILLIAMS wrote:
> > On Thu May 17 12:05:07 2012, Sc0ttie wrote: > > > > I mean a small actual test case that shows the problem. The code in
> that
> > Stack Overflow question seems to work fine, since it's generating
> output
> > and not dying.
> > Yes, run the code works correctly, but debugging crashes. I made a > screencast > for you. It's available on following links: > - http://youtu.be/8ZPo6v7L8Kg > or > - https://docs.google.com/open?id=0B5h6wpurkllBcEh2Q3dqSHl0NHM >
That’s interesting. Does this module redefine its overload methods at run time? Is it perhaps triggering a perl bug? https://rt.cpan.org/Ticket/Display.html?id=69862 comes to mind.
On Fri May 18 12:46:13 2012, SPROUT wrote: Show quoted text
> > That’s interesting. Does this module redefine its overload methods at > run time?
Nope. It just has one 'use overload' statement, which is executed at load time. Show quoted text
> Is it perhaps > triggering a perl bug? > https://rt.cpan.org/Ticket/Display.html?id=69862 comes to mind.
Probably. It runs under the debugger in my version of perl just fine. Scottie, to narrow this down, you'll need to post a much smaller test case.
From: ford.rick [...] gmail.com
I also had this bug pop up intermittently, though I have been unable to actually determine what conditions cause it to occur. However, it looks like changing line 34 in Path/Class/Dir.pm from: $_[0] eq '' ? (shift, $s->rootdir) : to: "$_[0]" eq '' ? (shift, $s->rootdir) : should prevent the error from occurring.
Hi Rick, thanks for tracking this down. Does the following patch also fix it? ================== --- a/lib/Path/Class/Dir.pm +++ b/lib/Path/Class/Dir.pm @@ -28,7 +28,7 @@ sub new { my $s = $self->_spec; my $first = (@_ == 0 ? $s->curdir : - $_[0] eq '' ? (shift, $s->rootdir) : + !ref($_[0]) && $_[0] eq '' ? (shift, $s->rootdir) : shift() ); ==================