Track down mysterious CARP_TRACE, don’t try to AUTOLOAD or create method through can()

Remove test for previous appearance in _global
This commit is contained in:
Eric A. Miller
2018-04-01 22:04:07 -04:00
parent facdf5b7a7
commit cc05fb927f
2 changed files with 5 additions and 7 deletions

View File

@@ -3884,7 +3884,6 @@ These methods return data as a scalar.
sub _global {
my $method = shift;
my $oid = shift;
return if $method eq 'CARP_TRACE';
return sub {
my $self = shift;
@@ -4680,6 +4679,8 @@ sub can {
# use results of parent can()
return $self->SUPER::can($method) if $self->SUPER::can($method);
return if $method eq 'CARP_TRACE';
my $validated = $self->_validate_autoload_method($method);
return unless $validated;
@@ -4756,6 +4757,8 @@ sub AUTOLOAD {
my $self = shift;
my ($sub_name) = $AUTOLOAD =~ /::(\w+)$/;
return if $sub_name eq 'CARP_TRACE';
# Typos in function calls in SNMP::Info subclasses turn into
# AUTOLOAD requests for non-methods. While this is deprecated,
# we'll still get called, so report a less confusing error.