r50497 - in /trunk/libdatetimex-easy-perl: ./ debian/ inc/Module/ inc/Module/Install/ lib/DateTimeX/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Fri Jan 8 02:39:30 UTC 2010
Author: jawnsy-guest
Date: Fri Jan 8 02:39:23 2010
New Revision: 50497
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=50497
Log:
* New upstream release
* Standards-Version 3.8.3 (no changes)
* Add myself to Uploaders and Copyright
* Rewrite control description
* Refresh to new DEP5 copyright format
Modified:
trunk/libdatetimex-easy-perl/Changes
trunk/libdatetimex-easy-perl/META.yml
trunk/libdatetimex-easy-perl/Makefile.PL
trunk/libdatetimex-easy-perl/README
trunk/libdatetimex-easy-perl/debian/changelog
trunk/libdatetimex-easy-perl/debian/control
trunk/libdatetimex-easy-perl/debian/copyright
trunk/libdatetimex-easy-perl/inc/Module/AutoInstall.pm
trunk/libdatetimex-easy-perl/inc/Module/Install.pm
trunk/libdatetimex-easy-perl/inc/Module/Install/AutoInstall.pm
trunk/libdatetimex-easy-perl/inc/Module/Install/Base.pm
trunk/libdatetimex-easy-perl/inc/Module/Install/Can.pm
trunk/libdatetimex-easy-perl/inc/Module/Install/Fetch.pm
trunk/libdatetimex-easy-perl/inc/Module/Install/Include.pm
trunk/libdatetimex-easy-perl/inc/Module/Install/Makefile.pm
trunk/libdatetimex-easy-perl/inc/Module/Install/Metadata.pm
trunk/libdatetimex-easy-perl/inc/Module/Install/Win32.pm
trunk/libdatetimex-easy-perl/inc/Module/Install/WriteAll.pm
trunk/libdatetimex-easy-perl/lib/DateTimeX/Easy.pm
Modified: trunk/libdatetimex-easy-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/Changes?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/Changes (original)
+++ trunk/libdatetimex-easy-perl/Changes Fri Jan 8 02:39:23 2010
@@ -1,6 +1,9 @@
TODO:
- Add some syntactic sugar to make timezone conversion easier
- Perform multiple conversions in one call (via [])
+
+0.088:
+ - Remove DateTime::Format::DateParse from dependencies as fails lots of tests and not used (thanks ranguard)
0.087:
- TODO'd some tests that were breaking because of time zone weirdness
Modified: trunk/libdatetimex-easy-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/META.yml?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/META.yml (original)
+++ trunk/libdatetimex-easy-perl/META.yml Fri Jan 8 02:39:23 2010
@@ -8,7 +8,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
-generated_by: 'Module::Install version 0.87'
+generated_by: 'Module::Install version 0.91'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -19,14 +19,15 @@
- inc
- t
requires:
+ Date::Parse: 0
DateTime: 0
DateTime::Format::DateManip: 0
- DateTime::Format::DateParse: 0
DateTime::Format::Flexible: 0
DateTime::Format::ICal: 0
DateTime::Format::Natural: 0
Scalar::Util: 0
+ Time::Zone: 0
resources:
license: http://dev.perl.org/licenses/
repository: http://github.com/robertkrimen/datetimex-easy/tree/master
-version: 0.087
+version: 0.088
Modified: trunk/libdatetimex-easy-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/Makefile.PL?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/Makefile.PL (original)
+++ trunk/libdatetimex-easy-perl/Makefile.PL Fri Jan 8 02:39:23 2010
@@ -24,8 +24,9 @@
_END_
map { my ($pk, $vr) = split m/\s/; requires $pk => $vr || 0 } grep { ! /^\s*#/ } split m/\n/, <<_END_;
+Date::Parse
+Time::Zone
DateTime
-DateTime::Format::DateParse
DateTime::Format::Natural
DateTime::Format::Flexible
DateTime::Format::ICal
Modified: trunk/libdatetimex-easy-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/README?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/README (original)
+++ trunk/libdatetimex-easy-perl/README Fri Jan 8 02:39:23 2010
@@ -3,7 +3,7 @@
available
VERSION
- Version 0.087
+ Version 0.088
SYNOPSIS
# Make DateTimeX object for "now":
Modified: trunk/libdatetimex-easy-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/debian/changelog?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/debian/changelog (original)
+++ trunk/libdatetimex-easy-perl/debian/changelog Fri Jan 8 02:39:23 2010
@@ -1,4 +1,11 @@
-libdatetimex-easy-perl (0.087-2) UNRELEASED; urgency=low
+libdatetimex-easy-perl (0.088-1) UNRELEASED; urgency=low
+
+ [ Jonathan Yu ]
+ * New upstream release
+ * Standards-Version 3.8.3 (no changes)
+ * Add myself to Uploaders and Copyright
+ * Rewrite control description
+ * Refresh to new DEP5 copyright format
[ Nathan Handler ]
* debian/watch: Update to ignore development releases.
@@ -11,7 +18,7 @@
[ Ryan Niebur ]
* Update ryan52's email address
- -- Ryan Niebur <ryan at debian.org> Fri, 25 Sep 2009 00:24:33 -0700
+ -- Jonathan Yu <jawnsy at cpan.org> Thu, 07 Jan 2010 21:30:01 -0500
libdatetimex-easy-perl (0.087-1) unstable; urgency=low
Modified: trunk/libdatetimex-easy-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/debian/control?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/debian/control (original)
+++ trunk/libdatetimex-easy-perl/debian/control Fri Jan 8 02:39:23 2010
@@ -2,25 +2,25 @@
Section: perl
Priority: optional
Build-Depends: debhelper (>= 7.0.8), quilt (>= 0.46-7)
-Build-Depends-Indep: perl, libtest-most-perl,
- libdatetime-format-flexible-perl, libdatetime-perl,
- libdatetime-format-natural-perl, libdatetime-format-dateparse-perl,
- libdatetime-format-ical-perl, libdatetime-format-datemanip-perl
+Build-Depends-Indep: perl, libtest-most-perl, libdatetime-format-natural-perl,
+ libdatetime-format-datemanip-perl, libdatetime-format-dateparse-perl,
+ libdatetime-format-flexible-perl, libdatetime-format-ical-perl,
+ libdatetime-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Ryan Niebur <ryan at debian.org>
-Standards-Version: 3.8.1
+Uploaders: Ryan Niebur <ryan at debian.org>, Jonathan Yu <jawnsy at cpan.org>
+Standards-Version: 3.8.3
Homepage: http://search.cpan.org/dist/DateTimeX-Easy/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libdatetimex-easy-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libdatetimex-easy-perl/
Package: libdatetimex-easy-perl
Architecture: all
-Depends: ${perl:Depends}, ${misc:Depends},
- libdatetime-format-flexible-perl, libdatetime-perl,
- libdatetime-format-natural-perl, libdatetime-format-dateparse-perl,
- libdatetime-format-ical-perl, libdatetime-format-datemanip-perl
-Description: Perl module to parse a date/time string using the best method available
- DateTimeX::Easy makes DateTime object creation quick and easy. It
- uses a variety of DateTime::Format packages to do the bulk of the
- parsing, with some custom tweaks to smooth out the rough edges
+Depends: ${perl:Depends}, ${misc:Depends}, libdatetime-format-flexible-perl,
+ libdatetime-format-dateparse-perl, libdatetime-format-datemanip-perl,
+ libdatetime-format-ical-perl, libdatetime-format-natural-perl,
+ libdatetime-perl
+Description: module to parse arbitrary date/time strings
+ DateTimeX::Easy is a Perl module designed to make it easy to create DateTime
+ objects from arbitrary strings. It uses a variety of DateTime::Format modules
+ to do the bulk of the parsing, with some tweaks to smooth out the rough edges
(mainly concerning timezone detection and selection).
Modified: trunk/libdatetimex-easy-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/debian/copyright?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/debian/copyright (original)
+++ trunk/libdatetimex-easy-perl/debian/copyright Fri Jan 8 02:39:23 2010
@@ -1,47 +1,42 @@
-Format-Specification:
- http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
-Upstream-Maintainer: Robert Krimen, C<< <rkrimen at cpan.org> >>
-Upstream-Source: http://search.cpan.org/dist/DateTimeX-Easy/
-Upstream-Name: DateTimeX-Easy
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=59
+Maintainer: Robert Krimen <rkrimen at cpan.org>
+Source: http://search.cpan.org/dist/DateTimeX-Easy/
+Name: DateTimeX-Easy
Files: *
-Copyright: 2007 Robert Krimen, all rights reserved.
-License-Alias: Perl
-License: Artistic | GPL-1+
+Copyright: 2007, Robert Krimen <rkrimen at cpan.org>
+License: Artistic or GPL-1+
Files: lib/DateTimeX/Easy/DateParse.pm
-Copyright: 2005-6 Joshua Hoblitt
-License-Alias: Perl
-License: Artistic | GPL-1+
-X-Comment: this file is a (slightly modified) copy of
- DateTime::Format::DateParse, which is licensed under the same terms as
- perl.
- See this page: http://cpansearch.perl.org/src/JHOBLITT/DateTime-Format-DateParse-0.04/lib/DateTime/Format/DateParse.pod
- Copyright (c) 2005-6 Joshua Hoblitt. All rights reserved. This program is free
- software; you can redistribute it and/or modify it under the same terms as Perl
- itself.
-
-Files: debian/*
-Copyright: 2009, Ryan Niebur <ryan at debian.org>
-License: Artistic | GPL-1+
+Copyright: 2005-2006, Joshua Hoblitt
+License: Artistic or GPL-1+
+Comment: this file is a modified copy of DateTime::Format::DateParse,
+ which is licensed under the same terms as Perl.
Files: inc/Module/*
Copyright: 2002-2009, Adam Kennedy <adamk at cpan.org>
2002-2009, Audrey Tang <autrijus at autrijus.org>
2002-2009, Brian Ingerson <ingy at cpan.org>
-License-Alias: Perl
-License: Artistic | GPL-1+
+License: Artistic or GPL-1+
+
+Files: debian/*
+Copyright: 2010, Jonathan Yu <jawnsy at cpan.org>
+ 2009, Ryan Niebur <ryan at debian.org>
+License: Artistic or GPL-1+
License: Artistic
- This program is free software; you can redistribute it and/or modify
- it under the terms of the Artistic License, which comes with Perl.
- On Debian GNU/Linux systems, the complete text of the Artistic License
- can be found in `/usr/share/common-licenses/Artistic'
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Artistic License, which comes with Perl.
+ .
+ On Debian GNU/Linux systems, the complete text of the Artistic License
+ can be found in `/usr/share/common-licenses/Artistic'
License: GPL-1+
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
- any later version.
- On Debian GNU/Linux systems, the complete text of the GNU General
- Public License can be found in `/usr/share/common-licenses/GPL'
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+ .
+ On Debian GNU/Linux systems, the complete text of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL'
+
Modified: trunk/libdatetimex-easy-perl/inc/Module/AutoInstall.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/inc/Module/AutoInstall.pm?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/inc/Module/AutoInstall.pm (original)
+++ trunk/libdatetimex-easy-perl/inc/Module/AutoInstall.pm Fri Jan 8 02:39:23 2010
@@ -175,15 +175,24 @@
}
# XXX: check for conflicts and uninstalls(!) them.
- if (
- defined( my $cur = _version_check( _load($mod), $arg ||= 0 ) ) )
+ my $cur = _load($mod);
+ if (_version_cmp ($cur, $arg) >= 0)
{
print "loaded. ($cur" . ( $arg ? " >= $arg" : '' ) . ")\n";
push @Existing, $mod => $arg;
$DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
}
else {
- print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";
+ if (not defined $cur) # indeed missing
+ {
+ print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";
+ }
+ else
+ {
+ # no need to check $arg as _version_cmp ($cur, undef) would satisfy >= above
+ print "too old. ($cur < $arg)\n";
+ }
+
push @required, $mod => $arg;
}
}
@@ -268,8 +277,11 @@
require CPAN;
- if ($CPAN::VERSION > '1.89' && $cpan_env) {
- return _running_under('CPAN');
+ if ($CPAN::VERSION > '1.89') {
+ if ($cpan_env) {
+ return _running_under('CPAN');
+ }
+ return; # CPAN.pm new enough, don't need to check further
}
# last ditch attempt, this -will- configure CPAN, very sorry
@@ -310,7 +322,7 @@
while ( my ( $pkg, $ver ) = splice( @_, 0, 2 ) ) {
# grep out those already installed
- if ( defined( _version_check( _load($pkg), $ver ) ) ) {
+ if ( _version_cmp( _load($pkg), $ver ) >= 0 ) {
push @installed, $pkg;
}
else {
@@ -349,7 +361,7 @@
# see if we have successfully installed them
while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) {
- if ( defined( _version_check( _load($pkg), $ver ) ) ) {
+ if ( _version_cmp( _load($pkg), $ver ) >= 0 ) {
push @installed, $pkg;
}
elsif ( $args{do_once} and open( FAILED, '>> .#autoinstall.failed' ) ) {
@@ -404,7 +416,7 @@
my $success;
my $obj = $modtree->{$pkg};
- if ( $obj and defined( _version_check( $obj->{version}, $ver ) ) ) {
+ if ( $obj and _version_cmp( $obj->{version}, $ver ) >= 0 ) {
my $pathname = $pkg;
$pathname =~ s/::/\\W/;
@@ -497,7 +509,7 @@
my $obj = CPAN::Shell->expand( Module => $pkg );
my $success = 0;
- if ( $obj and defined( _version_check( $obj->cpan_version, $ver ) ) ) {
+ if ( $obj and _version_cmp( $obj->cpan_version, $ver ) >= 0 ) {
my $pathname = $pkg;
$pathname =~ s/::/\\W/;
@@ -561,7 +573,7 @@
my $ver = shift;
return
- if defined( _version_check( _load($class), $ver ) ); # no need to upgrade
+ if _version_cmp( _load($class), $ver ) >= 0; # no need to upgrade
if (
_prompt( "==> A newer version of $class ($ver) is required. Install?",
@@ -658,7 +670,7 @@
# Load CPAN.pm and it's configuration
sub _load_cpan {
- return if $CPAN::VERSION and not @_;
+ return if $CPAN::VERSION and $CPAN::Config and not @_;
require CPAN;
if ( $CPAN::HandleConfig::VERSION ) {
# Newer versions of CPAN have a HandleConfig module
@@ -670,9 +682,11 @@
}
# compare two versions, either use Sort::Versions or plain comparison
-sub _version_check {
+# return values same as <=>
+sub _version_cmp {
my ( $cur, $min ) = @_;
- return unless defined $cur;
+ return -1 unless defined $cur; # if 0 keep comparing
+ return 1 unless $min;
$cur =~ s/\s+$//;
@@ -683,16 +697,13 @@
) {
# use version.pm if it is installed.
- return (
- ( version->new($cur) >= version->new($min) ) ? $cur : undef );
+ return version->new($cur) <=> version->new($min);
}
elsif ( $Sort::Versions::VERSION or defined( _load('Sort::Versions') ) )
{
# use Sort::Versions as the sorting algorithm for a.b.c versions
- return ( ( Sort::Versions::versioncmp( $cur, $min ) != -1 )
- ? $cur
- : undef );
+ return Sort::Versions::versioncmp( $cur, $min );
}
warn "Cannot reliably compare non-decimal formatted versions.\n"
@@ -701,7 +712,7 @@
# plain comparison
local $^W = 0; # shuts off 'not numeric' bugs
- return ( $cur >= $min ? $cur : undef );
+ return $cur <=> $min;
}
# nothing; this usage is deprecated.
@@ -791,4 +802,4 @@
__END__
-#line 1045
+#line 1056
Modified: trunk/libdatetimex-easy-perl/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/inc/Module/Install.pm?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/inc/Module/Install.pm (original)
+++ trunk/libdatetimex-easy-perl/inc/Module/Install.pm Fri Jan 8 02:39:23 2010
@@ -28,7 +28,7 @@
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '0.87';
+ $VERSION = '0.91';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -353,7 +353,7 @@
if ( $] >= 5.006 ) {
open( FH, '<', $_[0] ) or die "open($_[0]): $!";
} else {
- open( FH, "< $_[0]" ) or die "open($_[0]): $!";
+ open( FH, "< $_[0]" ) or die "open($_[0]): $!";
}
my $string = do { local $/; <FH> };
close FH or die "close($_[0]): $!";
@@ -384,7 +384,7 @@
if ( $] >= 5.006 ) {
open( FH, '>', $_[0] ) or die "open($_[0]): $!";
} else {
- open( FH, "> $_[0]" ) or die "open($_[0]): $!";
+ open( FH, "> $_[0]" ) or die "open($_[0]): $!";
}
foreach ( 1 .. $#_ ) {
print FH $_[$_] or die "print($_[0]): $!";
Modified: trunk/libdatetimex-easy-perl/inc/Module/Install/AutoInstall.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/inc/Module/Install/AutoInstall.pm?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/inc/Module/Install/AutoInstall.pm (original)
+++ trunk/libdatetimex-easy-perl/inc/Module/Install/AutoInstall.pm Fri Jan 8 02:39:23 2010
@@ -2,13 +2,13 @@
package Module::Install::AutoInstall;
use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.87';
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
- @ISA = qw{Module::Install::Base};
}
sub AutoInstall { $_[0] }
Modified: trunk/libdatetimex-easy-perl/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/inc/Module/Install/Base.pm?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/inc/Module/Install/Base.pm (original)
+++ trunk/libdatetimex-easy-perl/inc/Module/Install/Base.pm Fri Jan 8 02:39:23 2010
@@ -4,7 +4,7 @@
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '0.87';
+ $VERSION = '0.91';
}
# Suspend handler for "redefined" warnings
@@ -13,42 +13,34 @@
$SIG{__WARN__} = sub { $w };
}
-### This is the ONLY module that shouldn't have strict on
-# use strict;
-
-#line 45
+#line 42
sub new {
- my ($class, %args) = @_;
-
- foreach my $method ( qw(call load) ) {
- next if defined &{"$class\::$method"};
- *{"$class\::$method"} = sub {
- shift()->_top->$method(@_);
- };
+ my $class = shift;
+ unless ( defined &{"${class}::call"} ) {
+ *{"${class}::call"} = sub { shift->_top->call(@_) };
}
-
- bless( \%args, $class );
+ unless ( defined &{"${class}::load"} ) {
+ *{"${class}::load"} = sub { shift->_top->load(@_) };
+ }
+ bless { @_ }, $class;
}
-#line 66
+#line 61
sub AUTOLOAD {
- my $self = shift;
local $@;
- my $autoload = eval {
- $self->_top->autoload
- } or return;
- goto &$autoload;
+ my $func = eval { shift->_top->autoload } or return;
+ goto &$func;
}
-#line 83
+#line 75
sub _top {
$_[0]->{_top};
}
-#line 98
+#line 90
sub admin {
$_[0]->_top->{admin}
@@ -56,7 +48,7 @@
Module::Install::Base::FakeAdmin->new;
}
-#line 114
+#line 106
sub is_admin {
$_[0]->admin->VERSION;
@@ -83,4 +75,4 @@
1;
-#line 162
+#line 154
Modified: trunk/libdatetimex-easy-perl/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/inc/Module/Install/Can.pm?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/inc/Module/Install/Can.pm (original)
+++ trunk/libdatetimex-easy-perl/inc/Module/Install/Can.pm Fri Jan 8 02:39:23 2010
@@ -2,16 +2,16 @@
package Module::Install::Can;
use strict;
-use Module::Install::Base;
-use Config ();
-use File::Spec ();
-use ExtUtils::MakeMaker ();
+use Config ();
+use File::Spec ();
+use ExtUtils::MakeMaker ();
+use Module::Install::Base ();
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.87';
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
- @ISA = qw{Module::Install::Base};
}
# check if we can load some module
Modified: trunk/libdatetimex-easy-perl/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/inc/Module/Install/Fetch.pm?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/inc/Module/Install/Fetch.pm (original)
+++ trunk/libdatetimex-easy-perl/inc/Module/Install/Fetch.pm Fri Jan 8 02:39:23 2010
@@ -2,13 +2,13 @@
package Module::Install::Fetch;
use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.87';
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
- @ISA = qw{Module::Install::Base};
}
sub get_file {
Modified: trunk/libdatetimex-easy-perl/inc/Module/Install/Include.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/inc/Module/Install/Include.pm?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/inc/Module/Install/Include.pm (original)
+++ trunk/libdatetimex-easy-perl/inc/Module/Install/Include.pm Fri Jan 8 02:39:23 2010
@@ -2,13 +2,13 @@
package Module::Install::Include;
use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.87';
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
- @ISA = qw{Module::Install::Base};
}
sub include {
Modified: trunk/libdatetimex-easy-perl/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/inc/Module/Install/Makefile.pm?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/inc/Module/Install/Makefile.pm (original)
+++ trunk/libdatetimex-easy-perl/inc/Module/Install/Makefile.pm Fri Jan 8 02:39:23 2010
@@ -2,14 +2,14 @@
package Module::Install::Makefile;
use strict 'vars';
-use Module::Install::Base;
-use ExtUtils::MakeMaker ();
-
-use vars qw{$VERSION $ISCORE @ISA};
+use ExtUtils::MakeMaker ();
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.87';
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
- @ISA = qw{Module::Install::Base};
}
sub Makefile { $_[0] }
Modified: trunk/libdatetimex-easy-perl/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/inc/Module/Install/Metadata.pm?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/inc/Module/Install/Metadata.pm (original)
+++ trunk/libdatetimex-easy-perl/inc/Module/Install/Metadata.pm Fri Jan 8 02:39:23 2010
@@ -2,18 +2,17 @@
package Module::Install::Metadata;
use strict 'vars';
-use Module::Install::Base;
+use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.87';
- @ISA = qw{Module::Install::Base};
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
}
my @boolean_keys = qw{
sign
- mymeta
};
my @scalar_keys = qw{
@@ -440,21 +439,21 @@
/ixms ) {
my $license_text = $1;
my @phrases = (
- 'under the same (?:terms|license) as perl itself' => 'perl', 1,
- 'GNU general public license' => 'gpl', 1,
- 'GNU public license' => 'gpl', 1,
- 'GNU lesser general public license' => 'lgpl', 1,
- 'GNU lesser public license' => 'lgpl', 1,
- 'GNU library general public license' => 'lgpl', 1,
- 'GNU library public license' => 'lgpl', 1,
- 'BSD license' => 'bsd', 1,
- 'Artistic license' => 'artistic', 1,
- 'GPL' => 'gpl', 1,
- 'LGPL' => 'lgpl', 1,
- 'BSD' => 'bsd', 1,
- 'Artistic' => 'artistic', 1,
- 'MIT' => 'mit', 1,
- 'proprietary' => 'proprietary', 0,
+ 'under the same (?:terms|license) as (?:perl|the perl programming language) itself' => 'perl', 1,
+ 'GNU general public license' => 'gpl', 1,
+ 'GNU public license' => 'gpl', 1,
+ 'GNU lesser general public license' => 'lgpl', 1,
+ 'GNU lesser public license' => 'lgpl', 1,
+ 'GNU library general public license' => 'lgpl', 1,
+ 'GNU library public license' => 'lgpl', 1,
+ 'BSD license' => 'bsd', 1,
+ 'Artistic license' => 'artistic', 1,
+ 'GPL' => 'gpl', 1,
+ 'LGPL' => 'lgpl', 1,
+ 'BSD' => 'bsd', 1,
+ 'Artistic' => 'artistic', 1,
+ 'MIT' => 'mit', 1,
+ 'proprietary' => 'proprietary', 0,
);
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
@@ -506,17 +505,29 @@
}
}
+sub test_requires_from {
+ my $self = shift;
+ my $content = Module::Install::_readperl($_[0]);
+ my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg;
+ while ( @requires ) {
+ my $module = shift @requires;
+ my $version = shift @requires;
+ $self->test_requires( $module => $version );
+ }
+}
+
# Convert triple-part versions (eg, 5.6.1 or 5.8.9) to
# numbers (eg, 5.006001 or 5.008009).
# Also, convert double-part versions (eg, 5.8)
sub _perl_version {
my $v = $_[-1];
- $v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e;
+ $v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e;
$v =~ s/^([1-9])\.([1-9]\d?\d?)\.(0|[1-9]\d?\d?)$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e;
$v =~ s/(\.\d\d\d)000$/$1/;
$v =~ s/_.+$//;
if ( ref($v) ) {
- $v = $v + 0; # Numify
+ # Numify
+ $v = $v + 0;
}
return $v;
}
@@ -526,21 +537,56 @@
######################################################################
-# MYMETA.yml Support
+# MYMETA Support
sub WriteMyMeta {
die "WriteMyMeta has been deprecated";
}
-sub write_mymeta {
- my $self = shift;
-
- # If there's no existing META.yml there is nothing we can do
- return unless -f 'META.yml';
+sub write_mymeta_yaml {
+ my $self = shift;
# We need YAML::Tiny to write the MYMETA.yml file
unless ( eval { require YAML::Tiny; 1; } ) {
return 1;
+ }
+
+ # Generate the data
+ my $meta = $self->_write_mymeta_data or return 1;
+
+ # Save as the MYMETA.yml file
+ print "Writing MYMETA.yml\n";
+ YAML::Tiny::DumpFile('MYMETA.yml', $meta);
+}
+
+sub write_mymeta_json {
+ my $self = shift;
+
+ # We need JSON to write the MYMETA.json file
+ unless ( eval { require JSON; 1; } ) {
+ return 1;
+ }
+
+ # Generate the data
+ my $meta = $self->_write_mymeta_data or return 1;
+
+ # Save as the MYMETA.yml file
+ print "Writing MYMETA.json\n";
+ Module::Install::_write(
+ 'MYMETA.json',
+ JSON->new->pretty(1)->canonical->encode($meta),
+ );
+}
+
+sub _write_mymeta_data {
+ my $self = shift;
+
+ # If there's no existing META.yml there is nothing we can do
+ return undef unless -f 'META.yml';
+
+ # We need Parse::CPAN::Meta to load the file
+ unless ( eval { require Parse::CPAN::Meta; 1; } ) {
+ return undef;
}
# Merge the perl version into the dependencies
@@ -558,7 +604,7 @@
}
# Load the advisory META.yml file
- my @yaml = YAML::Tiny::LoadFile('META.yml');
+ my @yaml = Parse::CPAN::Meta::LoadFile('META.yml');
my $meta = $yaml[0];
# Overwrite the non-configure dependency hashs
@@ -572,9 +618,7 @@
$meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } };
}
- # Save as the MYMETA.yml file
- print "Writing MYMETA.yml\n";
- YAML::Tiny::DumpFile('MYMETA.yml', $meta);
+ return $meta;
}
1;
Modified: trunk/libdatetimex-easy-perl/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/inc/Module/Install/Win32.pm?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/inc/Module/Install/Win32.pm (original)
+++ trunk/libdatetimex-easy-perl/inc/Module/Install/Win32.pm Fri Jan 8 02:39:23 2010
@@ -2,12 +2,12 @@
package Module::Install::Win32;
use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.87';
- @ISA = qw{Module::Install::Base};
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: trunk/libdatetimex-easy-perl/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/inc/Module/Install/WriteAll.pm?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/inc/Module/Install/WriteAll.pm (original)
+++ trunk/libdatetimex-easy-perl/inc/Module/Install/WriteAll.pm Fri Jan 8 02:39:23 2010
@@ -2,11 +2,11 @@
package Module::Install::WriteAll;
use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.87';
+ $VERSION = '0.91';;
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
@@ -41,8 +41,18 @@
# The Makefile write process adds a couple of dependencies,
# so write the META.yml files after the Makefile.
- $self->Meta->write if $args{meta};
- $self->Meta->write_mymeta if $self->mymeta;
+ if ( $args{meta} ) {
+ $self->Meta->write;
+ }
+
+ # Experimental support for MYMETA
+ if ( $ENV{X_MYMETA} ) {
+ if ( $ENV{X_MYMETA} eq 'JSON' ) {
+ $self->Meta->write_mymeta_json;
+ } else {
+ $self->Meta->write_mymeta_yaml;
+ }
+ }
return 1;
}
Modified: trunk/libdatetimex-easy-perl/lib/DateTimeX/Easy.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdatetimex-easy-perl/lib/DateTimeX/Easy.pm?rev=50497&op=diff
==============================================================================
--- trunk/libdatetimex-easy-perl/lib/DateTimeX/Easy.pm (original)
+++ trunk/libdatetimex-easy-perl/lib/DateTimeX/Easy.pm Fri Jan 8 02:39:23 2010
@@ -11,11 +11,11 @@
=head1 VERSION
-Version 0.087
+Version 0.088
=cut
-our $VERSION = '0.087';
+our $VERSION = '0.088';
=head1 SYNOPSIS
More information about the Pkg-perl-cvs-commits
mailing list