more tolerant of weird subname calls in autoload

This commit is contained in:
Oliver Gorwits
2022-03-02 22:11:56 +00:00
parent 1c1dbe6464
commit 7f3028cbdb

View File

@@ -5132,9 +5132,9 @@ subclass.
sub AUTOLOAD {
my $self = shift;
my ($sub_name) = $AUTOLOAD =~ /::(\w+)$/;
my ($sub_name) = $AUTOLOAD =~ /::([a-zA-Z0-9_-]+)$/;
return if $sub_name eq 'CARP_TRACE';
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,