In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/8f055ec54050aa849e8025d5e060fb6dc9f079b8?hp=7e4c21aaad0cc18d004f5e2f89535e35778178a8>
- Log ----------------------------------------------------------------- commit 8f055ec54050aa849e8025d5e060fb6dc9f079b8 Author: Steffen Mueller <[email protected]> Date: Mon Sep 21 15:59:09 2009 +0200 Compare core to Attribute::Handlers 0.87 from CPAN M Porting/Maintainers.pl commit 248f30289f80d02b83f3d80d7ff575cb3e758ced Author: Steffen Mueller <[email protected]> Date: Mon Sep 21 15:58:31 2009 +0200 Upgrade to Attribute::Handlers 0.87 (which is just a core sync) M ext/Attribute-Handlers/Changes M ext/Attribute-Handlers/lib/Attribute/Handlers.pm A ext/XSLoader/XSLoader.pm A ext/lib/lib.pm ----------------------------------------------------------------------- Summary of changes: Porting/Maintainers.pl | 2 +- ext/Attribute-Handlers/Changes | 23 ++++++- ext/Attribute-Handlers/lib/Attribute/Handlers.pm | 6 +- ext/XSLoader/{XSLoader_pm.PL => XSLoader.pm} | 51 +------------- ext/lib/{lib_pm.PL => lib.pm} | 85 +--------------------- 5 files changed, 31 insertions(+), 136 deletions(-) copy ext/XSLoader/{XSLoader_pm.PL => XSLoader.pm} (90%) copy ext/lib/{lib_pm.PL => lib.pm} (75%) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 11eee6e..1ae2057 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -198,7 +198,7 @@ use File::Glob qw(:case); 'Attribute::Handlers' => { 'MAINTAINER' => 'rgarcia', - 'DISTRIBUTION' => 'SMUELLER/Attribute-Handlers-0.86.tar.gz', + 'DISTRIBUTION' => 'SMUELLER/Attribute-Handlers-0.87.tar.gz', 'FILES' => q[ext/Attribute-Handlers], 'CPAN' => 1, 'UPSTREAM' => "blead", diff --git a/ext/Attribute-Handlers/Changes b/ext/Attribute-Handlers/Changes index 13dd6f5..f91fa60 100644 --- a/ext/Attribute-Handlers/Changes +++ b/ext/Attribute-Handlers/Changes @@ -1,4 +1,4 @@ -Revision history for Perl extension Attribute-Handlers +t Revision history for Perl extension Attribute-Handlers 0.50 Sat Apr 21 16:09:31 2001 - original version; @@ -132,3 +132,24 @@ Revision history for Perl extension Attribute-Handlers 0.86 Sat Aug 8 12:41:00 CET 2009 - Add resources (bugtracker, ...) section to META.yml +0.86_01 Thu Sep 17 10:01:00 CET 2009 + - From perl change 09330df80caf214f375fcf0c04857347e3b17c69 (Zefram): + + Fix [perl #66970] Incorrect coderef in MODIFY_CODE_ATTRIBUTES + + Attribute handlers being applied to a temporary CV has actually been + reported as a bug, #66970. The attached patch fixes the bug, by + changing the order in which things happen: attributes are now applied + after the temporary CV has been merged into the existing CV or has + otherwise been added to the appropriate GV. + + The change breaks part of Attribute::Handlers. Part of A:H searches the + package to find the name of the sub to which a :ATTR attribute is being + applied, and the correct time at which to launch that search depends + crucially on the order in which the CV construction events occur. So + this patch also includes a change to A:H, to make it detect which way + things happen. The resulting A:H works either way, which is essential + for its dual-life nature. + +0.87 Mon Sep 21 15:55:00 CET 2009 + - Promote to stable release diff --git a/ext/Attribute-Handlers/lib/Attribute/Handlers.pm b/ext/Attribute-Handlers/lib/Attribute/Handlers.pm index b8625ae..ea11b8f 100644 --- a/ext/Attribute-Handlers/lib/Attribute/Handlers.pm +++ b/ext/Attribute-Handlers/lib/Attribute/Handlers.pm @@ -4,7 +4,7 @@ use Carp; use warnings; use strict; use vars qw($VERSION $AUTOLOAD); -$VERSION = '0.86'; # remember to update version in POD! +$VERSION = '0.87'; # remember to update version in POD! # $DB::single=1; my %symcache; @@ -257,8 +257,8 @@ Attribute::Handlers - Simpler definition of attribute handlers =head1 VERSION -This document describes version 0.86 of Attribute::Handlers, -released August 8, 2009. +This document describes version 0.87 of Attribute::Handlers, +released September 21, 2009. =head1 SYNOPSIS diff --git a/ext/XSLoader/XSLoader_pm.PL b/ext/XSLoader/XSLoader.pm similarity index 90% copy from ext/XSLoader/XSLoader_pm.PL copy to ext/XSLoader/XSLoader.pm index a258f6e..28130c1 100644 --- a/ext/XSLoader/XSLoader_pm.PL +++ b/ext/XSLoader/XSLoader.pm @@ -1,16 +1,3 @@ -use strict; -use Config; - -sub to_string { - my ($value) = @_; - $value =~ s/\\/\\\\/g; - $value =~ s/'/\\'/g; - return "'$value'"; -} - -1 while unlink "XSLoader.pm"; -open OUT, ">XSLoader.pm" or die $!; -print OUT <<'EOT'; # Generated from XSLoader.pm.PL (resolved %Config::Config value) package XSLoader; @@ -22,11 +9,7 @@ $VERSION = "0.10"; # enable debug/trace messages from DynaLoader perl code # $dl_debug = $ENV{PERL_DL_DEBUG} || 0 unless defined $dl_debug; -EOT - -print OUT ' my $dl_dlext = ', to_string($Config::Config{'dlext'}), ";\n" ; - -print OUT <<'EOT'; + my $dl_dlext = 'so'; package DynaLoader; @@ -52,24 +35,6 @@ sub load { my @modparts = split(/::/,$module); my $modfname = $modparts[-1]; -EOT - -print OUT <<'EOT' if defined &DynaLoader::mod2fname; - # Some systems have restrictions on files names for DLL's etc. - # mod2fname returns appropriate file base name (typically truncated) - # It may also edit @modparts if required. - $modfname = &mod2fname(\...@modparts) if defined &mod2fname; - -EOT - -print OUT <<'EOT' if $^O eq 'os2'; - - # os2 static build can dynaload, but cannot dynaload Perl modules... - die 'Dynaloaded Perl modules are not available in this build of Perl' if $OS2::is_static; - -EOT - -print OUT <<'EOT'; my $modpname = join('/',@modparts); my $modlibname = (caller())[1]; my $c = @modparts; @@ -95,17 +60,6 @@ print OUT <<'EOT'; my $boot_symbol_ref; -EOT - - if ($^O eq 'darwin') { -print OUT <<'EOT'; - if ($boot_symbol_ref = dl_find_symbol(0, $bootname)) { - goto boot; #extension library has already been loaded, e.g. darwin - } -EOT - } - -print OUT <<'EOT'; # Many dynamic extension loading problems will appear to come from # this section of code: XYZ failed at line 123 of DynaLoader.pm. # Often these errors are actually occurring in the initialisation @@ -402,6 +356,3 @@ This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut -EOT - -close OUT or die $!; diff --git a/ext/lib/lib_pm.PL b/ext/lib/lib.pm similarity index 75% copy from ext/lib/lib_pm.PL copy to ext/lib/lib.pm index fabdbd0..471d381 100644 --- a/ext/lib/lib_pm.PL +++ b/ext/lib/lib.pm @@ -1,89 +1,16 @@ -use Config; -use File::Basename qw(&basename &dirname); -use File::Spec; -use Cwd; - -my $origdir = cwd; -chdir dirname($0); -my $file = basename($0, '.PL'); -$file =~ s/_(pm)$/.$1/i; - -my $useConfig; -my $Config_archname; -my $Config_version; -my $Config_inc_version_list; - -# Expand the variables only if explicitly requested -# or if a previously installed lib.pm does this, too -# because otherwise relocating Perl becomes much harder. - -my $expand_config_vars = 0; -if ($ENV{PERL_BUILD_EXPAND_CONFIG_VARS}) { - $expand_config_vars = 1; -} -elsif (exists $ENV{PERL_BUILD_EXPAND_CONFIG_VARS}) { - $expand_config_vars = 0; -} -else { - eval <<'HERE'; - require lib; - my $lib_file = $INC{"lib.pm"}; - open my $fh, '<', $lib_file - or die "Could not open file '$lib_file' for reading: $!"; - my $ConfigRegex = qr/(?:use|require)\s+Config(?:\s+|;)/; - my $found_config = 0; - while (defined($_ = <$fh>)) { - # crude heuristics to check that we were using Config - if (/^\s*$ConfigRegex/ || /^\s*eval.*$ConfigRegex/) { - $found_config = 1; - last; - } - } - $expand_config_vars = $found_config ? 0 : 1; -HERE - $expand_config_vars = 0 if $@; -} - -if ($expand_config_vars) { - $useConfig = ''; - $Config_archname = qq('$Config{archname}'); - $Config_version = qq('$Config{version}'); - my @Config_inc_version_list = - reverse split / /, $Config{inc_version_list}; - $Config_inc_version_list = - @Config_inc_version_list ? - qq(qw(@Config_inc_version_list)) : q(()); -} else { - $useConfig = 'use Config;'; - $Config_archname = q($Config{archname}); - $Config_version = q($Config{version}); - $Config_inc_version_list = - q(reverse split / /, $Config{inc_version_list}); -} - -open OUT,">$file" or die "Can't create $file: $!"; - -print "Extracting $file (with variable substitutions)\n"; - -# In this section, perl variables will be expanded during extraction. -# You can use $Config{...} to use Configure variables. - -print OUT <<"!GROK!THIS!"; package lib; # THIS FILE IS AUTOMATICALLY GENERATED FROM lib_pm.PL. # ANY CHANGES TO THIS FILE WILL BE OVERWRITTEN BY THE NEXT PERL BUILD. -$useConfig +use Config; use strict; -my \$archname = $Config_archname; -my \$version = $Config_version; -my \...@inc_version_list = $Config_inc_version_list; +my $archname = $Config{archname}; +my $version = $Config{version}; +my @inc_version_list = reverse split / /, $Config{inc_version_list}; -!GROK!THIS! -print OUT <<'!NO!SUBS!'; our @ORIG_INC = @INC; # take a handy copy of 'original' value our $VERSION = '0.62'; @@ -313,7 +240,3 @@ can benefit from bug fixes. This package has the same copyright and license as the perl core. =cut -!NO!SUBS! - -close OUT or die "Can't close $file: $!"; -chdir $origdir; -- Perl5 Master Repository
