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/Fcntl | |
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/Fcntl')
-rw-r--r-- | ext/Fcntl/Fcntl.pm | 8 | ||||
-rw-r--r-- | ext/Fcntl/Makefile.PL | 2 |
2 files changed, 2 insertions, 8 deletions
diff --git a/ext/Fcntl/Fcntl.pm b/ext/Fcntl/Fcntl.pm index 6e1c1afdcd..b1d2051b0e 100644 --- a/ext/Fcntl/Fcntl.pm +++ b/ext/Fcntl/Fcntl.pm @@ -56,7 +56,7 @@ See L<perlfunc/stat> about the S_I* constants. =cut use strict; -our($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, $AUTOLOAD); +our($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); require Exporter; require XSLoader; @@ -183,10 +183,4 @@ XSLoader::load(); O_NOTRANS ), map {@{$_}} values %EXPORT_TAGS); -sub AUTOLOAD { - (my $constname = $AUTOLOAD) =~ s/.*:://; - die "&Fcntl::constant not defined" if $constname eq 'constant'; - constant($constname); -} - 1; diff --git a/ext/Fcntl/Makefile.PL b/ext/Fcntl/Makefile.PL index 470291ffa3..cb8a8e6788 100644 --- a/ext/Fcntl/Makefile.PL +++ b/ext/Fcntl/Makefile.PL @@ -39,7 +39,7 @@ my @names = (qw( {name=>"SEEK_END", default=>["IV", "2"]}, {name=>"_S_IFMT", macro=>"S_IFMT", value=>"S_IFMT"}); WriteConstants( - PROXYSUBS => {croak_on_error => 1}, + PROXYSUBS => {autoload => 1}, NAME => 'Fcntl', NAMES => \@names, ); |