On Mon, Jul 27, 2009 at 06:24:36PM -0400, John Peacock wrote: > David Golden wrote: > > I'd like to be able to have you (or someone else, like me) automate > > the patch process using Porting/add-package.pl or some equivalent > > tool. I think the only big impediment is that add-packages.pl doesn't > > respect/use the exclude list in Porting/Maintainers.pl. > > That would be wonderful, but at the moment, there are other manual operations > (like the test file) that impeded such automation. Once 5.10.1 is out the door, > I can try and move the version.pm code into ext/, at which point I can try and > come up with a unified approach for both CPAN and core... Just so I understand this fully... Is it intended that the version.pm file shipped with 5.10.1 (that identifies itself as 0.77), should differ considerably from the file version.pm obtained from the version-0.77.tar.gz file on CPAN? The diff is shown below. --- ../cpan/untarred/version-0.77/lib/version.pm 2009-07-26 12:49:11.000000000 +0100 +++ lib/version.pm 2009-06-29 16:40:34.000000000 +0100 @@ -6,48 +6,10 @@ use vars qw(@ISA $VERSION $CLASS *declare *qv); -$VERSION = '0.77'; -$VERSION = eval $VERSION; +$VERSION = 0.77; $CLASS = 'version'; -eval "use version::vxs $VERSION"; -if ( $@ ) { # don't have the XS version installed - eval "use version::vpp $VERSION"; # don't tempt fate - die "$@" if ( $@ ); - push @ISA, "version::vpp"; - local $^W; - *version::qv = \&version::vpp::qv; - *version::declare = \&version::vpp::declare; - *version::_VERSION = \&version::vpp::_VERSION; - if ($] > 5.009001 && $] <= 5.010000) { - no strict 'refs'; - *{'version::stringify'} = \*version::vpp::stringify; - *{'version::(""'} = \*version::vpp::stringify; - *{'version::new'} = \*version::vpp::new; - } -} -else { # use XS module - push @ISA, "version::vxs"; - local $^W; - *version::declare = \&version::vxs::declare; - *version::qv = \&version::vxs::qv; - *version::_VERSION = \&version::vxs::_VERSION; - if ($] > 5.009001 && $] < 5.010000) { - no strict 'refs'; - *{'version::stringify'} = \*version::vxs::stringify; - *{'version::(""'} = \*version::vxs::stringify; - } - elsif ($] == 5.010000) { - no strict 'refs'; - *{'version::stringify'} = \*version::vxs::stringify; - *{'version::(""'} = \*version::vxs::stringify; - *version::new = \&version::vxs::new; - *version::parse = \&version::vxs::parse; - } - -} - # Preloaded methods go here. sub import { no strict 'refs'; @@ -71,7 +33,7 @@ 'UNIVERSAL::VERSION' => 1, ); } - + my $callpkg = caller(); if (exists($args{declare})) { @@ -86,11 +48,6 @@ unless defined(&{"$callpkg\::qv"}); } - if (exists($args{'UNIVERSAL::VERSION'})) { - local $^W; - *UNIVERSAL::VERSION = \&version::_VERSION; - } - if (exists($args{'VERSION'})) { *{$callpkg."::VERSION"} = \&version::_VERSION; } -- That he said that that that that is is is debatable, is debatable.Thread Previous | Thread Next