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/I18N-Langinfo | |
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/I18N-Langinfo')
-rw-r--r-- | ext/I18N-Langinfo/Langinfo.pm | 11 | ||||
-rw-r--r-- | ext/I18N-Langinfo/Makefile.PL | 2 |
2 files changed, 1 insertions, 12 deletions
diff --git a/ext/I18N-Langinfo/Langinfo.pm b/ext/I18N-Langinfo/Langinfo.pm index 48e44ce201..8af32de5a9 100644 --- a/ext/I18N-Langinfo/Langinfo.pm +++ b/ext/I18N-Langinfo/Langinfo.pm @@ -74,17 +74,6 @@ our @EXPORT_OK = qw( our $VERSION = '0.07'; -sub AUTOLOAD { - # This AUTOLOAD is used to 'autoload' constants from the constant() - # XS function. - - my $constname; - our $AUTOLOAD; - ($constname = $AUTOLOAD) =~ s/.*:://; - croak "&I18N::Langinfo::constant not defined" if $constname eq 'constant'; - constant($constname); -} - XSLoader::load(); 1; diff --git a/ext/I18N-Langinfo/Makefile.PL b/ext/I18N-Langinfo/Makefile.PL index 2cc590afae..b5ed77f6b6 100644 --- a/ext/I18N-Langinfo/Makefile.PL +++ b/ext/I18N-Langinfo/Makefile.PL @@ -30,7 +30,7 @@ push @names, # This lot are only enums for __SVR4_I386_ABI_L1__: foreach qw (CRNCYSTR THOUSEP RADIXCHAR); ExtUtils::Constant::WriteConstants( - PROXYSUBS => {croak_on_error => 1}, + PROXYSUBS => {autoload => 1}, NAME => 'I18N::Langinfo', NAMES => \@names, ); |