diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1997-04-01 12:01:35 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-04-01 12:01:35 +1200 |
commit | dc848c6f6758d4d951bb5c7a9f432e6390e094df (patch) | |
tree | b1ff54c203609fbf9148e072f34e0109600bb3a4 /universal.c | |
parent | 212ac238b7c76fe74b999bd66633ce1bda0b362f (diff) | |
download | perl-dc848c6f6758d4d951bb5c7a9f432e6390e094df.tar.gz |
[inseparable changes from match from perl-5.003_96 to perl-5.003_97]
CORE LANGUAGE CHANGES
Subject: Reenable but deprecate inherited AUTOLOAD for plain funcs
From: Chip Salzenberg <chip@perl.com>
Files: ext/DynaLoader/DynaLoader.pm gv.c lib/Text/ParseWords.pm pod/perldelta.pod pod/perldiag.pod t/op/method.t
CORE PORTABILITY
Subject: Win32 update
Date: Wed, 02 Apr 1997 01:08:09 -0500
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: win32/VC-2.0/modules.mak win32/VC-2.0/perl.mak win32/VC- 2.0/perldll.mak win32/perl.mak
Msg-ID: 199704020608.BAA29538@aatma.engin.umich.edu
(applied based on p5p patch as commit 8d0ff1118aaee510902477e928a660803304346c)
DOCUMENTATION
Subject: Clean up some poddities, and make C<make html> work again
From: Chip Salzenberg <chip@perl.com>
Files: pod/Makefile pod/perldelta.pod pod/perldiag.pod pod/perlfaq8.pod pod/perlfunc.pod pod/perlop.pod pod/perltrap.pod
Subject: Eliminate pod warnings in libs
From: Chip Salzenberg <chip@perl.com>
Files: lib/CGI.pm lib/ExtUtils/Command.pm
LIBRARY AND EXTENSIONS
Subject: Eliminate warning in CGI.pm
From: Chip Salzenberg <chip@perl.com>
Files: lib/CGI.pm
OTHER CORE CHANGES
Subject: Introduce and use gv_fetchmethod_autoload()
From: Chip Salzenberg <chip@perl.com>
Files: global.sym gv.c pod/perlguts.pod proto.h universal.c
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/universal.c b/universal.c index 938538f2a6..b082da67ff 100644 --- a/universal.c +++ b/universal.c @@ -131,8 +131,6 @@ XS(XS_UNIVERSAL_can) SV *sv; char *name; SV *rv; - GV *gv; - CV *cvp; HV *pkg = NULL; if (items != 2) @@ -152,16 +150,9 @@ XS(XS_UNIVERSAL_can) } if (pkg) { - gv = gv_fetchmethod(pkg, name); - - if(gv && GvCV(gv)) { - /* If the sub is only a stub then we may have a gv to AUTOLOAD */ - GV **gvp = (GV**)hv_fetch(GvSTASH(gv), name, strlen(name), TRUE); - if(gvp && (cvp = GvCV(*gvp))) { - rv = sv_newmortal(); - sv_setsv(rv, newRV((SV*)cvp)); - } - } + GV *gv = gv_fetchmethod_autoload(pkg, name, FALSE); + if (gv && isGV(gv)) + rv = sv_2mortal(newRV((SV*)GvCV(gv))); } ST(0) = rv; |