From: Doug MacEachern Date: Tue, 20 Jun 2000 21:54:12 +0000 (-0700) Subject: [PATCH] remove forward declarations in Socket.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fcd41e8dd198cae69e67503098f9a2518f93b4e1;p=p5sagit%2Fp5-mst-13.2.git [PATCH] remove forward declarations in Socket.pm Date: Tue, 20 Jun 2000 21:54:12 -0700 (PDT) Message-ID: From: Doug MacEachern Subject: Re: [PATCH] remove forward declarations in Socket.pm Date: Fri, 23 Jun 2000 00:09:29 -0700 (PDT) Message-ID: p4raw-id: //depot/cfgperl@6226 --- diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm index 02f098d..025888d 100644 --- a/ext/Socket/Socket.pm +++ b/ext/Socket/Socket.pm @@ -325,116 +325,6 @@ sub sockaddr_un { } } -sub INADDR_ANY (); -sub INADDR_BROADCAST (); -sub INADDR_LOOPBACK (); -sub INADDR_LOOPBACK (); - -sub AF_802 (); -sub AF_APPLETALK (); -sub AF_CCITT (); -sub AF_CHAOS (); -sub AF_DATAKIT (); -sub AF_DECnet (); -sub AF_DLI (); -sub AF_ECMA (); -sub AF_GOSIP (); -sub AF_HYLINK (); -sub AF_IMPLINK (); -sub AF_INET (); -sub AF_LAT (); -sub AF_MAX (); -sub AF_NBS (); -sub AF_NIT (); -sub AF_NS (); -sub AF_OSI (); -sub AF_OSINET (); -sub AF_PUP (); -sub AF_SNA (); -sub AF_UNIX (); -sub AF_UNSPEC (); -sub AF_X25 (); -sub IOV_MAX (); -sub MSG_BCAST (); -sub MSG_CTLFLAGS (); -sub MSG_CTLIGNORE (); -sub MSG_CTRUNC (); -sub MSG_DONTROUTE (); -sub MSG_DONTWAIT (); -sub MSG_EOF (); -sub MSG_EOR (); -sub MSG_ERRQUEUE (); -sub MSG_FIN (); -sub MSG_MAXIOVLEN (); -sub MSG_MCAST (); -sub MSG_NOSIGNAL (); -sub MSG_OOB (); -sub MSG_PEEK (); -sub MSG_PROXY (); -sub MSG_RST (); -sub MSG_SYN (); -sub MSG_TRUNC (); -sub MSG_URG (); -sub MSG_WAITALL (); -sub PF_802 (); -sub PF_APPLETALK (); -sub PF_CCITT (); -sub PF_CHAOS (); -sub PF_DATAKIT (); -sub PF_DECnet (); -sub PF_DLI (); -sub PF_ECMA (); -sub PF_GOSIP (); -sub PF_HYLINK (); -sub PF_IMPLINK (); -sub PF_INET (); -sub PF_LAT (); -sub PF_MAX (); -sub PF_NBS (); -sub PF_NIT (); -sub PF_NS (); -sub PF_OSI (); -sub PF_OSINET (); -sub PF_PUP (); -sub PF_SNA (); -sub PF_UNIX (); -sub PF_UNSPEC (); -sub PF_X25 (); -sub SCM_CONNECT (); -sub SCM_CREDENTIALS (); -sub SCM_CREDS (); -sub SCM_RIGHTS (); -sub SCM_TIMESTAMP (); -sub SHUT_RD (); -sub SHUT_RDWR (); -sub SHUT_WR (); -sub SOCK_DGRAM (); -sub SOCK_RAW (); -sub SOCK_RDM (); -sub SOCK_SEQPACKET (); -sub SOCK_STREAM (); -sub SOL_SOCKET (); -sub SOMAXCONN (); -sub SO_ACCEPTCONN (); -sub SO_BROADCAST (); -sub SO_DEBUG (); -sub SO_DONTLINGER (); -sub SO_DONTROUTE (); -sub SO_ERROR (); -sub SO_KEEPALIVE (); -sub SO_LINGER (); -sub SO_OOBINLINE (); -sub SO_RCVBUF (); -sub SO_RCVLOWAT (); -sub SO_RCVTIMEO (); -sub SO_REUSEADDR (); -sub SO_SNDBUF (); -sub SO_SNDLOWAT (); -sub SO_SNDTIMEO (); -sub SO_TYPE (); -sub SO_USELOOPBACK (); -sub UIO_MAXIOV (); - sub AUTOLOAD { my($constname); ($constname = $AUTOLOAD) =~ s/.*:://; diff --git a/op.c b/op.c index d70f0d5..4591984 100644 --- a/op.c +++ b/op.c @@ -4431,9 +4431,15 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) if (!name || GvCVGEN(gv)) cv = Nullcv; else if ((cv = GvCV(gv))) { - cv_ckproto(cv, gv, ps); + bool exists = CvROOT(cv) || CvXSUB(cv); + /* if the subroutine doesn't exist and wasn't pre-declared + * with a prototype, assume it will be AUTOLOADed, + * skipping the prototype check + */ + if (exists || SvPOK(cv)) + cv_ckproto(cv, gv, ps); /* already defined (or promised)? */ - if (CvROOT(cv) || CvXSUB(cv) || GvASSUMECV(gv)) { + if (exists || GvASSUMECV(gv)) { SV* const_sv; bool const_changed = TRUE; if (!block && !attrs) {