New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perl5db.pl DB::sub does not properly handle overloaded blessed anonymous subroutines #13503
Comments
From @mjdominusCreated by @mjdominusConsider the following program: package Foo; package main; $s->(); print "Done\n"; Under Perl 5.18.1 this runs without fault, prints "Done", and exits However, under 'perl -d' it causes a fatal error in perl5db.pl's "DB::sub" method. To see this, run perl -d perlbugbug and enter the "c" command twice. Instead of printing "Done" the Operation "eq": no method found, Sure enough, line 4106 is performing an "eq" comparison of the sub if ($sub eq 'threads::new' && $ENV{PERL5DB_THREADED}) { It seems that the code here assumes that the sub will be a string, and I have a auperstition that whatever I am doing at exactly midnight 2014 is only a few hours old. Nevertheless, I nominate this bug for Perl Info
|
From mjd@cpan.orgOn Tue Dec 31 21:15:26 2013, mjd@plover.com wrote:
This was an editing error. You only need to enter "c" once. If you use "n" instead of "c", you will need to enter it twice. |
From [Unknown Contact. See original ticket]On Tue Dec 31 21:15:26 2013, mjd@plover.com wrote:
This was an editing error. You only need to enter "c" once. If you use "n" instead of "c", you will need to enter it twice. |
From @cpansproutMark-Jason Dominus wrote:
$DB::sub will be set to a string if the sub name is determinable -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
From @mjdominus
Having thought about this more, I no longer think this is a bug in The 'overload' man page should probably have a warning about this, but The overload module itself could emit a warning if you try to define |
From @csjewellOn Thu, Jan 2, 2014, at 8:19, Mark Dominus wrote:
Except for one thing: Defining 'eq' may not necessarily be needed in The same things can be said for overloading 0+ or the spaceship operator So your proposed warning would have to be smart enough to know about --Curtis Jewell "Your random numbers are not that random" -- perl-5.10.1.tar.gz/util.c Strawberry Perl for Windows betas: http://strawberryperl.com/beta/ |
From perl5-porters@perl.orgMark Dominus wrote:
At the risk of derailing this thread, I wish the fallback default |
From @ap* Mark Jason Dominus <mjd@plover.com> [2014-01-02 16:25]:
I continue to think so.
I concur. But I do not believe that the debugger ought to be regarded as a piece * Father Chrysostomos <sprout@cpan.org> [2014-01-02 17:25]:
That makes sense, generally speaking; in terms of the bug, it wouldn’t Regards, |
Migrated from rt.perl.org#120911 (status was 'open')
Searchable as RT120911$
The text was updated successfully, but these errors were encountered: