In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/84efe3dfc6afbd8ea017ddcc4d5d213cc1a35c72?hp=3a5b580ccfc4c8c7d52ecd8ccd1431eb99a05a0f>

- Log -----------------------------------------------------------------
commit 84efe3dfc6afbd8ea017ddcc4d5d213cc1a35c72
Author: Craig A. Berry <[email protected]>
Date:   Fri Oct 8 14:07:59 2010 -0500

    ExtUtils::XSSymSet can now let the compiler shorten symbols.
    
    If the soon-to-be-implemented configuration option
    -Duseshortenedsymbols has been selected, bypass the home-grown
    symbol shortening traditionally done by xsubpp because the
    compiler's /NAMES=SHORTENED feature will be used instead.
    
    This is only relevant on VMS.
-----------------------------------------------------------------------

Summary of changes:
 lib/ExtUtils/XSSymSet.pm |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/lib/ExtUtils/XSSymSet.pm b/lib/ExtUtils/XSSymSet.pm
index 548c7ea..7ef2df3 100644
--- a/lib/ExtUtils/XSSymSet.pm
+++ b/lib/ExtUtils/XSSymSet.pm
@@ -1,13 +1,17 @@
 package ExtUtils::XSSymSet;
 
 use strict;
+use Config;
 use vars qw( $VERSION );
-$VERSION = '1.1';
+$VERSION = '1.2';
 
 
 sub new { 
   my($pkg,$maxlen,$silent) = @_;
   $maxlen ||= 31;
+  # Allow absurdly long symbols here if we've told the compiler to
+  # do the shortening for us.
+  $maxlen = 2048 if $Config{'useshortenedsymbols'};
   $silent ||= 0;
   my($obj) = { '_...@xlen' => $maxlen, '__S!lent' => $silent };
   bless $obj, $pkg;
@@ -21,6 +25,8 @@ sub trimsym {
     if (ref $self) { $maxlen ||= $self->{'_...@xlen'}; }
     $maxlen ||= 31;
   }
+  $maxlen = 2048 if $Config{'useshortenedsymbols'};
+
   unless (defined $silent) {
     if (ref $self) { $silent ||= $self->{'__S!lent'}; }
     $silent ||= 0;
@@ -165,7 +171,10 @@ Creates an empty C<ExtUtils::XSSymset> set of symbols.  
This function may be
 called as a static method or via an existing object.  If C<$maxlen> or
 C<$silent> are specified, they are used as the defaults for maximum
 name length and warning behavior in future calls to addsym() or
-trimsym() via this object.
+trimsym() via this object.  If the compiler has been instructed to do its
+own symbol shortening via C<$Config{'useshortenedsymbols'}>, a value of
+2048 is assumed for C<$maxlen> as a way of bypassing the shortening done by
+this module.
 
 =item addsym($name[,$maxlen[,$silent]])
 
@@ -191,7 +200,10 @@ to 31.  Unless C<$silent> is true, a warning is output if 
C<$name>
 is altered in any way.  This function may be called either as a
 static method or via an existing object, but in the latter case no
 check is made to insure that the resulting name is unique in the
-set of symbols.
+set of symbols.    If the compiler has been instructed to do its
+own symbol shortening via C<$Config{'useshortenedsymbols'}>, a value
+of 2048 is assumed for C<$maxlen> as a way of bypassing the shortening
+done by this module.
 
 =item delsym($name)
 
@@ -233,5 +245,5 @@ Charles Bailey  E<lt>I<[email protected]>E<gt>
 
 =head1 REVISION
 
-Last revised 14-Feb-1997, for Perl 5.004.
+Last revised 8-Oct-2010, for Perl 5.13.6.
 

--
Perl5 Master Repository

Reply via email to