diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-10-20 09:32:16 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-10-21 08:42:19 +0200 |
commit | 7f39e0ae39033ab8b37028bcb877100291982e8e (patch) | |
tree | 3a6ec79b1d7efb54182f57105052bcf85d511b20 /ext/Socket | |
parent | c565ab54dc649bb62cd4d57149d7b2abb21df5f3 (diff) | |
download | perl-7f39e0ae39033ab8b37028bcb877100291982e8e.tar.gz |
Convert Fcntl, File::Glob, I18N::Langinfo and Socket to an XS AUTOLOAD.
All 4 use ExtUtils::Constant::ProxySubs, and only have an AUTOLOAD to deal with
failed constant lookups.
Diffstat (limited to 'ext/Socket')
-rw-r--r-- | ext/Socket/Makefile.PL | 2 | ||||
-rw-r--r-- | ext/Socket/Socket.pm | 7 |
2 files changed, 1 insertions, 8 deletions
diff --git a/ext/Socket/Makefile.PL b/ext/Socket/Makefile.PL index d81a5c34cc..7167aa4dbe 100644 --- a/ext/Socket/Makefile.PL +++ b/ext/Socket/Makefile.PL @@ -72,7 +72,7 @@ push @names, foreach qw(INADDR_ANY INADDR_LOOPBACK INADDR_NONE INADDR_BROADCAST); WriteConstants( - PROXYSUBS => {croak_on_error => 1}, + PROXYSUBS => {autoload => 1}, NAME => 'Socket', NAMES => \@names, ); diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm index a46d2fec68..da70114553 100644 --- a/ext/Socket/Socket.pm +++ b/ext/Socket/Socket.pm @@ -431,13 +431,6 @@ sub sockaddr_un { } } -sub AUTOLOAD { - my($constname); - ($constname = $AUTOLOAD) =~ s/.*:://; - croak "&Socket::constant not defined" if $constname eq 'constant'; - constant($constname); -} - XSLoader::load(); 1; |