In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/6101faccea00167a2d03759eb9317a09cf9d9412?hp=3025a2e42cd703f48878ec60605f8960d5732efb>

- Log -----------------------------------------------------------------
commit 6101faccea00167a2d03759eb9317a09cf9d9412
Author: Nicholas Clark <[email protected]>
Date:   Fri Oct 15 14:42:47 2010 +0100

    Implement File::Glob::GLOB_CSH in XS instead of perl.

M       ext/File-Glob/Glob.pm
M       ext/File-Glob/Makefile.PL

commit 4ffa64ab12e31efc743087461ba063710b6d203b
Author: Nicholas Clark <[email protected]>
Date:   Fri Oct 15 14:11:44 2010 +0100

    Use inlineable proxy constant subs for File::Glob

M       ext/File-Glob/Makefile.PL

commit aa0c903bd5e6e956eecfafc7bbbbcba3f6c2a55f
Author: Nicholas Clark <[email protected]>
Date:   Fri Oct 15 11:29:53 2010 +0100

    Express @File::Glob::EXPORT_OK in terms of %File::Glob::EXPORT_TAGS.
    
    This reduces duplication.

M       ext/File-Glob/Glob.pm

commit b84cd0b10c0ff4f2e533b112c9ffa37cc778f556
Author: Nicholas Clark <[email protected]>
Date:   Fri Oct 15 11:00:27 2010 +0100

    File::Glob::GLOB_ERROR is a real subroutine, not a constant().
    
    Previously it was bodged as a constant(), with an explicit wrapper 
subroutine
    in Glob.pm to call each time to get the value.

M       ext/File-Glob/Glob.pm
M       ext/File-Glob/Glob.xs
M       ext/File-Glob/Makefile.PL

commit 4306d9278175c0394a9e916b7a3b082e76092da1
Author: Nicholas Clark <[email protected]>
Date:   Fri Oct 15 09:53:28 2010 +0100

    Nothing autoloaded in Sys::Hostname or I18N::Langinfo, so don't use 
AutoLoader;

M       ext/I18N-Langinfo/Langinfo.pm
M       ext/Sys-Hostname/Hostname.pm

commit 1a22d347c03dcb480dd25ea0276587697f4eb2c7
Author: Nicholas Clark <[email protected]>
Date:   Fri Oct 15 09:52:54 2010 +0100

    Remove erroneous references to AutoLoader from File::Glob.

M       ext/File-Glob/Glob.pm
-----------------------------------------------------------------------

Summary of changes:
 ext/File-Glob/Glob.pm         |   43 ++--------------------------------------
 ext/File-Glob/Glob.xs         |    9 ++++++++
 ext/File-Glob/Makefile.PL     |    6 ++++-
 ext/I18N-Langinfo/Langinfo.pm |    3 +-
 ext/Sys-Hostname/Hostname.pm  |    3 +-
 5 files changed, 19 insertions(+), 45 deletions(-)

diff --git a/ext/File-Glob/Glob.pm b/ext/File-Glob/Glob.pm
index dcd9a47..5ae3c6d 100644
--- a/ext/File-Glob/Glob.pm
+++ b/ext/File-Glob/Glob.pm
@@ -11,28 +11,6 @@ require XSLoader;
 # NOTE: The glob() export is only here for compatibility with 5.6.0.
 # csh_glob() should not be used directly, unless you know what you're doing.
 
-...@export_ok   = qw(
-    csh_glob
-    bsd_glob
-    glob
-    GLOB_ABEND
-    GLOB_ALPHASORT
-    GLOB_ALTDIRFUNC
-    GLOB_BRACE
-    GLOB_CSH
-    GLOB_ERR
-    GLOB_ERROR
-    GLOB_LIMIT
-    GLOB_MARK
-    GLOB_NOCASE
-    GLOB_NOCHECK
-    GLOB_NOMAGIC
-    GLOB_NOSORT
-    GLOB_NOSPACE
-    GLOB_QUOTE
-    GLOB_TILDE
-);
-
 %EXPORT_TAGS = (
     'glob' => [ qw(
         GLOB_ABEND
@@ -56,6 +34,8 @@ require XSLoader;
     ) ],
 );
 
+...@export_ok   = (@{$EXPORT_TAGS{'glob'}}, 'csh_glob');
+
 $VERSION = '1.09';
 
 sub import {
@@ -79,8 +59,7 @@ sub import {
 
 sub AUTOLOAD {
     # This AUTOLOAD is used to 'autoload' constants from the constant()
-    # XS function.  If a constant is not found then control is passed
-    # to the AUTOLOAD in AutoLoader.
+    # XS function.
 
     my $constname;
     ($constname = $AUTOLOAD) =~ s/.*:://;
@@ -95,27 +74,11 @@ sub AUTOLOAD {
 
 XSLoader::load();
 
-# Preloaded methods go here.
-
-sub GLOB_ERROR {
-    return (constant('GLOB_ERROR'))[1];
-}
-
-sub GLOB_CSH () {
-    GLOB_BRACE()
-       | GLOB_NOMAGIC()
-       | GLOB_QUOTE()
-       | GLOB_TILDE()
-       | GLOB_ALPHASORT()
-}
-
 $DEFAULT_FLAGS = GLOB_CSH();
 if ($^O =~ /^(?:MSWin32|VMS|os2|dos|riscos)$/) {
     $DEFAULT_FLAGS |= GLOB_NOCASE();
 }
 
-# Autoload methods go after =cut, and are processed by the autosplit program.
-
 sub bsd_glob {
     my ($pat,$flags) = @_;
     $flags = $DEFAULT_FLAGS if @_ < 2;
diff --git a/ext/File-Glob/Glob.xs b/ext/File-Glob/Glob.xs
index 59345e7..30e7f82 100644
--- a/ext/File-Glob/Glob.xs
+++ b/ext/File-Glob/Glob.xs
@@ -27,6 +27,15 @@ errfunc(const char *foo, int bar) {
 
 MODULE = File::Glob            PACKAGE = File::Glob
 
+int
+GLOB_ERROR()
+    PREINIT:
+       dMY_CXT;
+    CODE:
+       RETVAL = GLOB_ERROR;
+    OUTPUT:
+       RETVAL
+
 BOOT:
 {
     MY_CXT_INIT;
diff --git a/ext/File-Glob/Makefile.PL b/ext/File-Glob/Makefile.PL
index a0f4e6e..790613b 100644
--- a/ext/File-Glob/Makefile.PL
+++ b/ext/File-Glob/Makefile.PL
@@ -22,10 +22,14 @@ sub MY::cflags {
 }
 
 WriteConstants(
+    PROXYSUBS => 1,
     NAME => 'File::Glob',
     NAMES => [qw(GLOB_ABEND GLOB_ALPHASORT GLOB_ALTDIRFUNC GLOB_BRACE GLOB_ERR
                  GLOB_LIMIT GLOB_MARK GLOB_NOCASE GLOB_NOCHECK GLOB_NOMAGIC
                  GLOB_NOSORT GLOB_NOSPACE GLOB_QUOTE GLOB_TILDE),
-              {name=>"GLOB_ERROR", macro=>["#ifdef 
GLOB_ERROR\n\tdMY_CXT;\n\n","#endif\n"]}],
+            {name => 'GLOB_CSH',
+             value => 
'GLOB_BRACE|GLOB_NOMAGIC|GLOB_QUOTE|GLOB_TILDE|GLOB_ALPHASORT',
+             macro => 1},
+            ],
     BREAKOUT_AT => 8,
 );
diff --git a/ext/I18N-Langinfo/Langinfo.pm b/ext/I18N-Langinfo/Langinfo.pm
index f7bac77..32d724a 100644
--- a/ext/I18N-Langinfo/Langinfo.pm
+++ b/ext/I18N-Langinfo/Langinfo.pm
@@ -7,7 +7,6 @@ use Carp;
 
 require Exporter;
 require DynaLoader;
-use AutoLoader;
 
 our @ISA = qw(Exporter DynaLoader);
 
@@ -73,7 +72,7 @@ our @EXPORT_OK = qw(
        YESSTR
 );
 
-our $VERSION = '0.04';
+our $VERSION = '0.05';
 
 sub AUTOLOAD {
     # This AUTOLOAD is used to 'autoload' constants from the constant()
diff --git a/ext/Sys-Hostname/Hostname.pm b/ext/Sys-Hostname/Hostname.pm
index 2e2e53b..d3ab6f3 100644
--- a/ext/Sys-Hostname/Hostname.pm
+++ b/ext/Sys-Hostname/Hostname.pm
@@ -5,9 +5,8 @@ use strict;
 use Carp;
 
 require Exporter;
-require AutoLoader;
 
-our @ISA     = qw/ Exporter AutoLoader /;
+our @ISA     = qw/ Exporter /;
 our @EXPORT  = qw/ hostname /;
 
 our $VERSION;

--
Perl5 Master Repository

Reply via email to