develooper Front page | perl.perl5.porters | Postings from October 2007

[perl #47047] Use of inherited AUTOLOAD for non-method is deprecated

Thread Next
From:
Rick Delaney
Date:
October 30, 2007 20:20
Subject:
[perl #47047] Use of inherited AUTOLOAD for non-method is deprecated
Message ID:
rt-3.6.HEAD-24634-1193800780-55.47047-75-0@perl.org
# New Ticket Created by  Rick Delaney 
# Please include the string:  [perl #47047]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=47047 >


This warning sometimes comes up for real methods.  Attached is a patch
to fix this.  The patch contains a test case which fails like this
before the fix.

lib/warnings..................................................PROG:
# gv.c
sub Other::AUTOLOAD { 1 } sub Other::fred {}
@ISA = qw(Other) ;
use warnings 'deprecated' ;
fred() ;
my $x = \&barney;
(bless[])->barney;
EXPECTED:
Use of inherited AUTOLOAD for non-method main::fred() is deprecated at - line 5.
GOT:
Use of inherited AUTOLOAD for non-method main::fred() is deprecated at - line 5.
Use of inherited AUTOLOAD for non-method main::barney() is deprecated at - line 7.
# Failed at ../t/lib/common.pl line 190
FAILED at test 285

-- 
Rick Delaney
rick@bort.ca


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About