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
Object reference instead of method name in $AUTOLOAD #14813
Comments
From @vportonThis is a bug report for perl from porton@narod.ru, #!/usr/bin/perl use strict; package A; sub new { our $AUTOLOAD; print "AUTOLOAD $AUTOLOAD() called.\n"; sub can { package main; my $obj = A->new; my $method = $obj->can("xxx"); __END__ AUTOLOAD() is called with $AUTOLOAD set to the object, instead of being I think, this is an error. Whether it is error or not, please provide a workaround way to call Flags: Site configuration information for perl 5.20.2: Configured by Debian Project at Fri May 15 11:27:53 UTC 2015. Summary of my perl5 (revision 5 version 20 subversion 2) configuration: Locally applied patches: @INC for perl 5.20.2: Environment for perl 5.20.2: |
From zefram@fysh.orgvia RT wrote:
The logic of this operation requires that $AUTOLOAD in the inner sub No Perl bug here. -zefram |
The RT System itself - Status changed from 'new' to 'open' |
From @cowensOn Fri, Jul 24, 2015 at 9:07 AM, via RT <perlbug-followup@perl.org> wrote:
The $_[0] in the anonymous subroutine is referring to the first #!/usr/bin/perl use strict; package A; sub new { our $AUTOLOAD; print "AUTOLOAD $AUTOLOAD() called.\n"; sub can { return $self->SUPER::can(@_) || sub{ $AUTOLOAD = "$class::$name"; goto package main; my $obj = A->new; my $method = $obj->can("xxx"); -- |
Migrated from rt.perl.org#125676 (status was 'open')
Searchable as RT125676$
The text was updated successfully, but these errors were encountered: