In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/4daffb2bd8ac01845985e3bfe0e23d10a1dab19c?hp=3c5c23ec01bf5490af5a806f2a535f2b1ced9f9f>

- Log -----------------------------------------------------------------
commit 4daffb2bd8ac01845985e3bfe0e23d10a1dab19c
Author: Steffen Mueller <[email protected]>
Date:   Sun Apr 18 17:51:19 2010 +0200

    Upgrade Scalar-List-Utils to 1.23 from CPAN

M       Porting/Maintainers.pl
M       cpan/List-Util/Changes
M       cpan/List-Util/ListUtil.xs
M       cpan/List-Util/lib/List/Util.pm
M       cpan/List-Util/lib/List/Util/PP.pm
M       cpan/List-Util/lib/List/Util/XS.pm
M       cpan/List-Util/lib/Scalar/Util.pm
M       cpan/List-Util/lib/Scalar/Util/PP.pm
M       cpan/List-Util/t/max.t
M       cpan/List-Util/t/min.t

commit 4db98c67157803f38c3920ded8b3708deb8accd5
Author: Steffen Mueller <[email protected]>
Date:   Sun Apr 18 16:39:29 2010 +0200

    Document the INCLUDE_COMMAND XS directive
    
    ExtUtils::ParseXS has recognized the INCLUDE_COMMAND directive as a
    smarter replacement for "INCLUDE: perl -e ... |" since version 2.21_01.

M       pod/perlxs.pod

commit 387b6f8d0cc8df27b7a577cf8a47f25b089895e4
Author: Steffen Mueller <[email protected]>
Date:   Sun Apr 18 17:14:57 2010 +0200

    Upgrade ExtUtils::ParseXS to 0.2205

M       Porting/Maintainers.pl
M       cpan/ExtUtils-ParseXS/Changes
M       cpan/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
M       cpan/ExtUtils-ParseXS/t/XSMore.xs
A       cpan/ExtUtils-ParseXS/t/lib/IncludeTester.pm
M       cpan/ExtUtils-ParseXS/t/more.t
-----------------------------------------------------------------------

Summary of changes:
 Porting/Maintainers.pl                        |    4 +-
 cpan/ExtUtils-ParseXS/Changes                 |   63 ++++++++++++++-
 cpan/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm |  104 ++++++++++++++++++++-----
 cpan/ExtUtils-ParseXS/t/XSMore.xs             |    2 +
 cpan/ExtUtils-ParseXS/t/lib/IncludeTester.pm  |   20 +++++
 cpan/ExtUtils-ParseXS/t/more.t                |    6 +-
 cpan/List-Util/Changes                        |   10 +++
 cpan/List-Util/ListUtil.xs                    |   17 ++---
 cpan/List-Util/lib/List/Util.pm               |    2 +-
 cpan/List-Util/lib/List/Util/PP.pm            |    2 +-
 cpan/List-Util/lib/List/Util/XS.pm            |    2 +-
 cpan/List-Util/lib/Scalar/Util.pm             |    2 +-
 cpan/List-Util/lib/Scalar/Util/PP.pm          |   19 ++---
 cpan/List-Util/t/max.t                        |    1 +
 cpan/List-Util/t/min.t                        |    1 +
 pod/perlxs.pod                                |   18 ++++-
 16 files changed, 220 insertions(+), 53 deletions(-)
 create mode 100644 cpan/ExtUtils-ParseXS/t/lib/IncludeTester.pm

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index ae6ef89..cbd65aa 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -628,7 +628,7 @@ use File::Glob qw(:case);
     'ExtUtils::ParseXS' =>
        {
        'MAINTAINER'    => 'kwilliams',
-    'DISTRIBUTION' => 'DAGOLDEN/ExtUtils-ParseXS-2.21.tar.gz',
+    'DISTRIBUTION' => 'DAGOLDEN/ExtUtils-ParseXS-2.2205.tar.gz',
     'EXCLUDED'  => [ qw{
                        t/bugs/RT48104.xs
                                    t/bugs/typemap
@@ -1311,7 +1311,7 @@ use File::Glob qw(:case);
     'Scalar-List-Utils' =>
        {
        'MAINTAINER'    => 'gbarr',
-       'DISTRIBUTION'  => 'GBARR/Scalar-List-Utils-1.22.tar.gz',
+       'DISTRIBUTION'  => 'GBARR/Scalar-List-Utils-1.23.tar.gz',
        # Note that perl uses its own version of Makefile.PL
        'FILES'         => q[cpan/List-Util],
        'EXCLUDED'      => [ qr{^inc/Module/},
diff --git a/cpan/ExtUtils-ParseXS/Changes b/cpan/ExtUtils-ParseXS/Changes
index d11c870..b7e7b0b 100644
--- a/cpan/ExtUtils-ParseXS/Changes
+++ b/cpan/ExtUtils-ParseXS/Changes
@@ -1,5 +1,62 @@
 Revision history for Perl extension ExtUtils::ParseXS.
 
+2.2205 - Wed Mar 10 18:15:36 EST 2010
+
+ Other:
+
+ - No longer ships with Build.PL to avoid creating a circular dependency
+
+2.2204 - Wed Mar 10 14:23:52 EST 2010
+
+ Other:
+
+ - Downgraded warnings on using INCLUDE with a command from "deprecated"
+   to "discouraged" and limited it to the case where the command includes
+   "perl" [Steffen Mueller]
+
+2.2203 - Thu Feb 11 14:00:51 EST 2010
+
+ Bug fixes:
+
+ - Build.PL was not including ExtUtils/xsubpp for installation.  Fixed
+   by subclassing M::B::find_pm_files to include it [David Golden]
+
+2.2202 - Wed Jan 27 15:04:59 EST 2010
+
+ Bug fixes:
+
+ - The fix to IN/OUT/OUTLIST was itself broken and is now fixed.
+   [Reported by Serdar Dalgic; fix suggested by Rafael Garcia-Suarez]
+
+   We apologize for the fault in the regex. Those responsible 
+   have been sacked.
+
+2.2201 Mon Jan 25 16:12:05 EST 2010
+
+ Bug fixes:
+
+ - IN/OUT/OUTLIST, etc. were broken due to a bad regexp.  [Simon Cozens]
+
+2.22 - Mon Jan 11 15:00:07 EST 2010
+
+ No changes from 2.21_02
+
+2.21_02 - Sat Dec 19 10:55:41 EST 2009
+
+ Bug fixes:
+
+ - fixed bugs and added tests for INCLUDE_COMMAND [Steffen Mueller]
+
+2.21_01 - Sat Dec 19 07:22:44 EST 2009
+
+ Enhancements:
+
+ - New 'INCLUDE_COMMAND' directive [Steffen Mueller]
+
+ Bug fixes:
+
+ - Workaround for empty newXS macro found in P5NCI [Goro Fuji]
+
 2.21 - Mon Oct  5 11:17:53 EDT 2009
 
  Bug fixes:
@@ -12,7 +69,7 @@ Revision history for Perl extension ExtUtils::ParseXS.
 
  Bug fixes:
  - Use "char* file" for perl < 5.9, not "char[] file"; fixes mod_perl
-   breakage due to prior attempts to fix RT#48104 [David Golden] 
+   breakage due to prior attempts to fix RT#48104 [David Golden]
 
 2.20_06 - Fri Oct  2 23:45:45 EDT 2009
 
@@ -62,8 +119,8 @@ Revision history for Perl extension ExtUtils::ParseXS.
 2.20_03 - Thu Jul 23 23:14:50 EDT 2009
 
  Bug fixes:
- - Fixed "const char *" errors for 5.8.8 (and older) (RT#48104) 
-   [Vincent Pit] 
+ - Fixed "const char *" errors for 5.8.8 (and older) (RT#48104)
+   [Vincent Pit]
  - Added newline before a preprocessor directive (RT#30673)
    [patch by hjp]
 
diff --git a/cpan/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm 
b/cpan/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
index 05c3e69..4f9492a 100644
--- a/cpan/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
+++ b/cpan/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
@@ -18,7 +18,7 @@ my(@XSStack); # Stack of conditionals and INCLUDEs
 my($XSS_work_idx, $cpp_next_tmp);
 
 use vars qw($VERSION);
-$VERSION = '2.21';
+$VERSION = '2.2205';
 $VERSION = eval $VERSION if $VERSION =~ /_/;
 
 use vars qw(%input_expr %output_expr $ProtoUsed @InitFileCode $FH $proto_re 
$Overload $errors $Fallback
@@ -230,9 +230,10 @@ sub process_file {
 
   # Match an XS keyword
   $BLOCK_re= '\s*(' . join('|', qw(
-                                  REQUIRE BOOT CASE PREINIT INPUT INIT CODE 
PPCODE OUTPUT
-                                  CLEANUP ALIAS ATTRS PROTOTYPES PROTOTYPE 
VERSIONCHECK INCLUDE
-                                  SCOPE INTERFACE INTERFACE_MACRO C_ARGS 
POSTCALL OVERLOAD FALLBACK
+                                  REQUIRE BOOT CASE PREINIT INPUT INIT CODE 
PPCODE
+                                  OUTPUT CLEANUP ALIAS ATTRS PROTOTYPES 
PROTOTYPE
+                                  VERSIONCHECK INCLUDE INCLUDE_COMMAND SCOPE 
INTERFACE
+                                  INTERFACE_MACRO C_ARGS POSTCALL OVERLOAD 
FALLBACK
                                  )) . "|$END)\\s*:";
 
   
@@ -448,7 +449,7 @@ EOF
     $xsreturn = 0;
 
     $_ = shift(@line);
-    while (my $kwd = 
check_keyword("REQUIRE|PROTOTYPES|FALLBACK|VERSIONCHECK|INCLUDE|SCOPE")) {
+    while (my $kwd = 
check_keyword("REQUIRE|PROTOTYPES|FALLBACK|VERSIONCHECK|INCLUDE(?:_COMMAND)?|SCOPE"))
 {
       &{"${kwd}_handler"}() ;
       next PARAGRAPH unless @line ;
       $_ = shift(@line);
@@ -520,11 +521,11 @@ EOF
          next unless defined($pre) && length($pre);
          my $out_type = '';
          my $inout_var;
-         if ($process_inout and s/^(IN|IN_OUTLIST|OUTLIST|OUT|IN_OUT)\s+//) {
+         if ($process_inout and s/^(IN|IN_OUTLIST|OUTLIST|OUT|IN_OUT)\b\s*//) {
            my $type = $1;
            $out_type = $type if $type ne 'IN';
-           $arg =~ s/^(IN|IN_OUTLIST|OUTLIST|OUT|IN_OUT)\s+//;
-           $pre =~ s/^(IN|IN_OUTLIST|OUTLIST|OUT|IN_OUT)\s+//;
+           $arg =~ s/^(IN|IN_OUTLIST|OUTLIST|OUT|IN_OUT)\b\s*//;
+           $pre =~ s/^(IN|IN_OUTLIST|OUTLIST|OUT|IN_OUT)\b\s*//;
          }
          my $islength;
          if ($name =~ /^length\( \s* (\w+) \s* \)\z/x) {
@@ -554,7 +555,7 @@ EOF
     } else {
       @args = split(/\s*,\s*/, $orig_args);
       for (@args) {
-       if ($process_inout and s/^(IN|IN_OUTLIST|OUTLIST|IN_OUT|OUT)\s+//) {
+       if ($process_inout and s/^(IN|IN_OUTLIST|OUTLIST|IN_OUT|OUT)\b\s*//) {
          my $out_type = $1;
          next if $out_type eq 'IN';
          $only_C_inlist{$_} = 1 if $out_type eq "OUTLIST";
@@ -934,6 +935,10 @@ EOF
 EOF
       }
     }
+    elsif($newXS eq 'newXS'){ # work around P5NCI's empty newXS macro
+      push(@InitFileCode,
+          "        ${newXS}(\"$pname\", XS_$Full_func_name, file$proto);\n");
+    }
     else {
       push(@InitFileCode,
           "        (void)${newXS}(\"$pname\", XS_$Full_func_name, 
file$proto);\n");
@@ -1481,6 +1486,22 @@ sub PROTOTYPES_handler ()
 
   }
 
+sub PushXSStack
+  {
+    # Save the current file context.
+    push(@XSStack, {
+                   type            => 'file',
+                   LastLine        => $lastline,
+                   LastLineNo      => $lastline_no,
+                   Line            => \...@line,
+                   LineNo          => \...@line_no,
+                   Filename        => $filename,
+                   Filepathname    => $filepathname,
+                   Handle          => $FH,
+                  }) ;
+
+  }
+
 sub INCLUDE_handler ()
   {
     # the rest of the current line should contain a valid filename
@@ -1499,17 +1520,16 @@ sub INCLUDE_handler ()
 
     ++ $IncludedFiles{$_} unless /\|\s*$/ ;
 
-    # Save the current file context.
-    push(@XSStack, {
-                   type                => 'file',
-                   LastLine        => $lastline,
-                   LastLineNo      => $lastline_no,
-                   Line            => \...@line,
-                   LineNo          => \...@line_no,
-                   Filename        => $filename,
-                   Filepathname    => $filepathname,
-                   Handle          => $FH,
-                  }) ;
+    if (/\|\s*$/ && /^\s*perl\s/) {
+      Warn("The INCLUDE directive with a command is discouraged." .
+           " Use INCLUDE_COMMAND instead! In particular using 'perl'" .
+           " in an 'INCLUDE: ... |' directive is not guaranteed to pick" .
+           " up the correct perl. The INCLUDE_COMMAND directive allows" .
+           " the use of \$^X as the currently running perl, see" .
+           " 'perldoc perlxs' for details.");
+    }
+
+    PushXSStack();
 
     $FH = Symbol::gensym();
 
@@ -1535,7 +1555,51 @@ EOF
 
     $lastline = $_ ;
     $lastline_no = $. ;
+  }
+
+sub INCLUDE_COMMAND_handler ()
+  {
+    # the rest of the current line should contain a valid command
+
+    TrimWhitespace($_) ;
+
+    death("INCLUDE_COMMAND: command missing")
+      unless $_ ;
+
+    death("INCLUDE_COMMAND: pipes are illegal")
+      if /^\s*\|/ or /\|\s*$/ ;
+
+    PushXSStack();
+
+    $FH = Symbol::gensym();
+
+    # If $^X is used in INCLUDE_COMMAND, we know it's supposed to be
+    # the same perl interpreter as we're currently running
+    s/^\s*\$\^X/$^X/;
+
+    # open the new file
+    open ($FH, "-|", "$_")
+      or death("Cannot run command '$_' to include its output: $!") ;
+
+    print Q(<<"EOF");
+#
+#/* INCLUDE_COMMAND:  Including output of '$_' from '$filename' */
+#
+EOF
+
+    $filename = $_ ;
+    $filepathname = "$dir/$filename";
+
+    # Prime the pump by reading the first
+    # non-blank line
 
+    # skip leading blank lines
+    while (<$FH>) {
+      last unless /^\s*$/ ;
+    }
+
+    $lastline = $_ ;
+    $lastline_no = $. ;
   }
 
 sub PopFile()
diff --git a/cpan/ExtUtils-ParseXS/t/XSMore.xs 
b/cpan/ExtUtils-ParseXS/t/XSMore.xs
index 173460e..f2fe902 100644
--- a/cpan/ExtUtils-ParseXS/t/XSMore.xs
+++ b/cpan/ExtUtils-ParseXS/t/XSMore.xs
@@ -106,6 +106,8 @@ outlist(OUTLIST int a, OUTLIST int b)
 int
 len(char* s, int length(s))
 
+INCLUDE_COMMAND: $^X -Ilib -It/lib -MIncludeTester -e IncludeTester::print_xs
+
 #if 1
 
 INCLUDE: XSInclude.xsh
diff --git a/cpan/ExtUtils-ParseXS/t/lib/IncludeTester.pm 
b/cpan/ExtUtils-ParseXS/t/lib/IncludeTester.pm
new file mode 100644
index 0000000..8d16254
--- /dev/null
+++ b/cpan/ExtUtils-ParseXS/t/lib/IncludeTester.pm
@@ -0,0 +1,20 @@
+package IncludeTester;
+use strict;
+
+sub print_xs {
+  print <<'HERE';
+
+int
+sum(a, b)
+    int a
+    int b
+  CODE:
+    RETVAL = a + b;
+  OUTPUT:
+    RETVAL
+
+HERE
+}
+
+1;
+
diff --git a/cpan/ExtUtils-ParseXS/t/more.t b/cpan/ExtUtils-ParseXS/t/more.t
index 8a934c2..2e55976 100644
--- a/cpan/ExtUtils-ParseXS/t/more.t
+++ b/cpan/ExtUtils-ParseXS/t/more.t
@@ -8,7 +8,7 @@ use ExtUtils::CBuilder;
 use attributes;
 use overload;
 
-plan tests => 24;
+plan tests => 25;
 
 my ($source_file, $obj_file, $lib_file);
 
@@ -42,7 +42,7 @@ SKIP: {
 }
 
 SKIP: {
-  skip "no dynamic loading", 5
+  skip "no dynamic loading", 6
     if !$b->have_compiler || !$Config{usedl};
   my $module = 'XSMore';
   $lib_file = $b->link( objects => $obj_file, module_name => $module );
@@ -88,6 +88,8 @@ SKIP: {
 
   is XSMore::len("foo"), 3, 'the length keyword';
 
+  is XSMore::sum(5, 9), 14, 'the INCLUDE_COMMAND directive';
+
   # Win32 needs to close the DLL before it can unlink it, but unfortunately
   # dl_unload_file was missing on Win32 prior to perl change #24679!
   if ($^O eq 'MSWin32' and defined &DynaLoader::dl_unload_file) {
diff --git a/cpan/List-Util/Changes b/cpan/List-Util/Changes
index 8f71596..552a95a 100644
--- a/cpan/List-Util/Changes
+++ b/cpan/List-Util/Changes
@@ -1,3 +1,13 @@
+1.23 -- Wed Mar 10 20:50:00 CST 2010
+
+  * Add a test file to ensure 'GETMAGIC' called once [gfx]
+  * "GETMAGIC" should be called only once [gfx]
+  * Use PERL_NO_GET_CONTEXT for efficiency (see perlguts) [gfx]
+  * Don't care about dVAR. ExtUtils::ParseXS deals with it. [gfx]
+  * t/p_max.t, t/p_min.t fail on perl5.8.1.  [tokuhirom]
+  * avoid non-portable warnings
+  * Fix PP::reftype in edge cases [gfx]
+
 1.22 -- Sat Nov 14 09:26:15 CST 2009
 
   * silence a compiler warning about an unreferenced local variable [Steve Hay]
diff --git a/cpan/List-Util/ListUtil.xs b/cpan/List-Util/ListUtil.xs
index dfde039..7da9b95 100644
--- a/cpan/List-Util/ListUtil.xs
+++ b/cpan/List-Util/ListUtil.xs
@@ -2,7 +2,7 @@
  * This program is free software; you can redistribute it and/or
  * modify it under the same terms as Perl itself.
  */
-
+#define PERL_NO_GET_CONTEXT /* we want efficiency */
 #include <EXTERN.h>
 #include <perl.h>
 #include <XSUB.h>
@@ -66,7 +66,7 @@ my_cxinc(pTHX)
 #  ifndef SvTAINTED
 
 static bool
-sv_tainted(SV *sv)
+sv_tainted(pTHX_ SV *sv)
 {
     if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv)) {
        MAGIC *mg = mg_find(sv, 't');
@@ -77,7 +77,7 @@ sv_tainted(SV *sv)
 }
 
 #    define SvTAINTED_on(sv) sv_magic((sv), Nullsv, 't', Nullch, 0)
-#    define SvTAINTED(sv) (SvMAGICAL(sv) && sv_tainted(sv))
+#    define SvTAINTED(sv) (SvMAGICAL(sv) && sv_tainted(aTHX_ sv))
 #  endif
 #  define PL_defgv defgv
 #  define PL_op op
@@ -126,10 +126,6 @@ sv_tainted(SV *sv)
 #define dNOOP extern int Perl___notused PERL_UNUSED_DECL
 #endif
 
-#ifndef dVAR
-#define dVAR dNOOP
-#endif
-
 #ifndef GvSVn
 #  define GvSVn GvSV
 #endif
@@ -282,7 +278,7 @@ reduce(block,...)
 PROTOTYPE: &@
 CODE:
 {
-    dVAR; dMULTICALL;
+    dMULTICALL;
     SV *ret = sv_newmortal();
     int index;
     GV *agv,*bgv,*gv;
@@ -321,7 +317,7 @@ first(block,...)
 PROTOTYPE: &@
 CODE:
 {
-    dVAR; dMULTICALL;
+    dMULTICALL;
     int index;
     GV *gv;
     HV *stash;
@@ -359,7 +355,6 @@ shuffle(...)
 PROTOTYPE: @
 CODE:
 {
-    dVAR;
     int index;
 #if (PERL_VERSION < 9)
     struct op dmy_op;
@@ -438,7 +433,7 @@ CODE:
 {
     if (SvMAGICAL(sv))
        mg_get(sv);
-    if(!sv_isobject(sv)) {
+    if(!(SvROK(sv) && SvOBJECT(SvRV(sv)))) {
        XSRETURN_UNDEF;
     }
     RETVAL = (char*)sv_reftype(SvRV(sv),TRUE);
diff --git a/cpan/List-Util/lib/List/Util.pm b/cpan/List-Util/lib/List/Util.pm
index 2b51a69..aced6b1 100644
--- a/cpan/List-Util/lib/List/Util.pm
+++ b/cpan/List-Util/lib/List/Util.pm
@@ -14,7 +14,7 @@ require Exporter;
 
 @ISA        = qw(Exporter);
 @EXPORT_OK  = qw(first min max minstr maxstr reduce sum shuffle);
-$VERSION    = "1.22";
+$VERSION    = "1.23";
 $XS_VERSION = $VERSION;
 $VERSION    = eval $VERSION;
 
diff --git a/cpan/List-Util/lib/List/Util/PP.pm 
b/cpan/List-Util/lib/List/Util/PP.pm
index 425f1c5..2771329 100644
--- a/cpan/List-Util/lib/List/Util/PP.pm
+++ b/cpan/List-Util/lib/List/Util/PP.pm
@@ -13,7 +13,7 @@ require Exporter;
 
 @ISA     = qw(Exporter);
 @EXPORT  = qw(first min max minstr maxstr reduce sum shuffle);
-$VERSION = "1.22";
+$VERSION = "1.23";
 $VERSION = eval $VERSION;
 
 sub reduce (&@) {
diff --git a/cpan/List-Util/lib/List/Util/XS.pm 
b/cpan/List-Util/lib/List/Util/XS.pm
index 76bf646..2dcb03a 100644
--- a/cpan/List-Util/lib/List/Util/XS.pm
+++ b/cpan/List-Util/lib/List/Util/XS.pm
@@ -3,7 +3,7 @@ use strict;
 use vars qw($VERSION);
 use List::Util;
 
-$VERSION = "1.22";           # FIXUP
+$VERSION = "1.23";           # FIXUP
 $VERSION = eval $VERSION;    # FIXUP
 
 sub _VERSION { # FIXUP
diff --git a/cpan/List-Util/lib/Scalar/Util.pm 
b/cpan/List-Util/lib/Scalar/Util.pm
index 24f146f..24138ca 100644
--- a/cpan/List-Util/lib/Scalar/Util.pm
+++ b/cpan/List-Util/lib/Scalar/Util.pm
@@ -13,7 +13,7 @@ require List::Util; # List::Util loads the XS
 
 @ISA       = qw(Exporter);
 @EXPORT_OK = qw(blessed dualvar reftype weaken isweak tainted readonly 
openhandle refaddr isvstring looks_like_number set_prototype);
-$VERSION    = "1.22";
+$VERSION    = "1.23";
 $VERSION   = eval $VERSION;
 
 unless (defined &dualvar) {
diff --git a/cpan/List-Util/lib/Scalar/Util/PP.pm 
b/cpan/List-Util/lib/Scalar/Util/PP.pm
index e94fe86..7850e1b 100644
--- a/cpan/List-Util/lib/Scalar/Util/PP.pm
+++ b/cpan/List-Util/lib/Scalar/Util/PP.pm
@@ -16,7 +16,7 @@ use B qw(svref_2object);
 
 @ISA     = qw(Exporter);
 @EXPORT  = qw(blessed reftype tainted readonly refaddr looks_like_number);
-$VERSION = "1.22";
+$VERSION = "1.23";
 $VERSION = eval $VERSION;
 
 sub blessed ($) {
@@ -41,20 +41,19 @@ sub refaddr($) {
 
   $addr =~ /0x(\w+)/;
   local $^W;
+  no warnings 'portable';
   hex($1);
 }
 
 {
   my %tmap = qw(
-    B::HV HASH
-    B::AV ARRAY
-    B::CV CODE
-    B::IO IO
-    B::NULL SCALAR
-    B::NV SCALAR
-    B::PV SCALAR
-    B::GV GLOB
-    B::RV REF
+    B::NULL   SCALAR
+
+    B::HV     HASH
+    B::AV     ARRAY
+    B::CV     CODE
+    B::IO     IO
+    B::GV     GLOB
     B::REGEXP REGEXP
   );
 
diff --git a/cpan/List-Util/t/max.t b/cpan/List-Util/t/max.t
index a982198..aff9166 100644
--- a/cpan/List-Util/t/max.t
+++ b/cpan/List-Util/t/max.t
@@ -50,6 +50,7 @@ is($v, 3, 'overload');
 use overload
   '""' => sub { ${$_[0]} },
   '+0' => sub { ${$_[0]} },
+  '>'  => sub { ${$_[0]} > ${$_[1]} },
   fallback => 1;
   sub new {
     my $class = shift;
diff --git a/cpan/List-Util/t/min.t b/cpan/List-Util/t/min.t
index eb8c1b9..13d1116 100644
--- a/cpan/List-Util/t/min.t
+++ b/cpan/List-Util/t/min.t
@@ -50,6 +50,7 @@ is($v, 1, 'overload');
 use overload
   '""' => sub { ${$_[0]} },
   '+0' => sub { ${$_[0]} },
+  '<'  => sub { ${$_[0]} < ${$_[1]} },
   fallback => 1;
   sub new {
     my $class = shift;
diff --git a/pod/perlxs.pod b/pod/perlxs.pod
index 5f773bb..afff655 100644
--- a/pod/perlxs.pod
+++ b/pod/perlxs.pod
@@ -1434,10 +1434,26 @@ The XS module can use INCLUDE: to pull that file into 
it.
     INCLUDE: Rpcb1.xsh
 
 If the parameters to the INCLUDE: keyword are followed by a pipe (C<|>) then
-the compiler will interpret the parameters as a command.
+the compiler will interpret the parameters as a command. This feature is
+mildly deprecated in favour of the C<INCLUDE_COMMAND:> directive, as documented
+below.
 
     INCLUDE: cat Rpcb1.xsh |
 
+Do not use this to run perl: C<INCLUDE: perl |> will run the perl that
+happens to be the first in your path and not necessarily the same perl that is
+used to run C<xsubpp>. See L<"The INCLUDE_COMMAND: Keyword">.
+
+=head2 The INCLUDE_COMMAND: Keyword
+
+Runs the supplied command and includes its output into the current XS
+document. C<INCLUDE_COMMAND> assigns special meaning to the C<$^X> token
+in that it runs the same perl interpreter that is running C<xsubpp>:
+
+    INCLUDE_COMMAND: cat Rpcb1.xsh
+
+    INCLUDE_COMMAND: $^X -e ...
+
 =head2 The CASE: Keyword
 
 The CASE: keyword allows an XSUB to have multiple distinct parts with each

--
Perl5 Master Repository

Reply via email to