r20622 - in /trunk/libtime-duration-parse-perl: ./ debian/ inc/Module/ inc/Module/Install/ inc/Test/ inc/Time/ lib/Time/Duration/ t/

yvesago-guest at users.alioth.debian.org yvesago-guest at users.alioth.debian.org
Sun Jun 1 19:20:24 UTC 2008


Author: yvesago-guest
Date: Sun Jun  1 19:20:24 2008
New Revision: 20622

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=20622
Log:
* new upstream release
* update changelog

Modified:
    trunk/libtime-duration-parse-perl/Changes
    trunk/libtime-duration-parse-perl/META.yml
    trunk/libtime-duration-parse-perl/debian/changelog
    trunk/libtime-duration-parse-perl/inc/Module/Install.pm
    trunk/libtime-duration-parse-perl/inc/Module/Install/Base.pm
    trunk/libtime-duration-parse-perl/inc/Module/Install/Can.pm
    trunk/libtime-duration-parse-perl/inc/Module/Install/Fetch.pm
    trunk/libtime-duration-parse-perl/inc/Module/Install/Include.pm
    trunk/libtime-duration-parse-perl/inc/Module/Install/Makefile.pm
    trunk/libtime-duration-parse-perl/inc/Module/Install/Metadata.pm
    trunk/libtime-duration-parse-perl/inc/Module/Install/Win32.pm
    trunk/libtime-duration-parse-perl/inc/Module/Install/WriteAll.pm
    trunk/libtime-duration-parse-perl/inc/Test/More.pm
    trunk/libtime-duration-parse-perl/inc/Time/Duration.pm
    trunk/libtime-duration-parse-perl/lib/Time/Duration/Parse.pm
    trunk/libtime-duration-parse-perl/t/01_parse.t

Modified: trunk/libtime-duration-parse-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/Changes?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/Changes (original)
+++ trunk/libtime-duration-parse-perl/Changes Sun Jun  1 19:20:24 2008
@@ -1,4 +1,7 @@
 Revision history for Perl extension Time::Duration::Parse
+
+0.06  Fri May 30 16:04:12 PDT 2008
+        - Accept 1.5h (Thanks to Thomas Sibley)
 
 0.05  Thu Jan 10 12:05:26 PST 2008
         - Accept hh:mm(:ss) as a format.

Modified: trunk/libtime-duration-parse-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/META.yml?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/META.yml (original)
+++ trunk/libtime-duration-parse-perl/META.yml Sun Jun  1 19:20:24 2008
@@ -1,11 +1,16 @@
+--- 
 abstract: Parse string that represents time duration
-author: Tatsuhiko Miyagawa <miyagawa at bulknews.net>
+author: 
+  - Tatsuhiko Miyagawa <miyagawa at bulknews.net>
 build_requires: 
   Test::More: 0
   Time::Duration: 0
 distribution_type: module
-generated_by: Module::Install version 0.64
+generated_by: Module::Install version 0.68
 license: perl
+meta-spec: 
+  url: http://module-build.sourceforge.net/META-spec-v1.3.html
+  version: 1.3
 name: Time-Duration-Parse
 no_index: 
   directory: 
@@ -13,4 +18,4 @@
     - t
 requires: 
   Exporter::Lite: 0
-version: 0.05
+version: 0.06

Modified: trunk/libtime-duration-parse-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/debian/changelog?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/debian/changelog (original)
+++ trunk/libtime-duration-parse-perl/debian/changelog Sun Jun  1 19:20:24 2008
@@ -1,3 +1,9 @@
+libtime-duration-parse-perl (0.06-1) UNRELEASED; urgency=low
+
+  * New upstream release 
+
+ -- AGOSTINI Yves <agostini at univ-metz.fr>  Sun, 01 Jun 2008 21:11:47 +0200
+
 libtime-duration-parse-perl (0.05-1) unstable; urgency=low
 
   * Initial Release (Closes: #476410)

Modified: trunk/libtime-duration-parse-perl/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/inc/Module/Install.pm?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/inc/Module/Install.pm (original)
+++ trunk/libtime-duration-parse-perl/inc/Module/Install.pm Sun Jun  1 19:20:24 2008
@@ -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.64';
+    $VERSION = '0.68';
 }
 
 # Whether or not inc::Module::Install is actually loaded, the

Modified: trunk/libtime-duration-parse-perl/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/inc/Module/Install/Base.pm?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/inc/Module/Install/Base.pm (original)
+++ trunk/libtime-duration-parse-perl/inc/Module/Install/Base.pm Sun Jun  1 19:20:24 2008
@@ -1,7 +1,7 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.64';
+$VERSION = '0.68';
 
 # Suspend handler for "redefined" warnings
 BEGIN {

Modified: trunk/libtime-duration-parse-perl/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/inc/Module/Install/Can.pm?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/inc/Module/Install/Can.pm (original)
+++ trunk/libtime-duration-parse-perl/inc/Module/Install/Can.pm Sun Jun  1 19:20:24 2008
@@ -11,7 +11,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.64';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: trunk/libtime-duration-parse-perl/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/inc/Module/Install/Fetch.pm?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/inc/Module/Install/Fetch.pm (original)
+++ trunk/libtime-duration-parse-perl/inc/Module/Install/Fetch.pm Sun Jun  1 19:20:24 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.64';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: trunk/libtime-duration-parse-perl/inc/Module/Install/Include.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/inc/Module/Install/Include.pm?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/inc/Module/Install/Include.pm (original)
+++ trunk/libtime-duration-parse-perl/inc/Module/Install/Include.pm Sun Jun  1 19:20:24 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.64';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: trunk/libtime-duration-parse-perl/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/inc/Module/Install/Makefile.pm?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/inc/Module/Install/Makefile.pm (original)
+++ trunk/libtime-duration-parse-perl/inc/Module/Install/Makefile.pm Sun Jun  1 19:20:24 2008
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.64';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -17,192 +17,221 @@
 my %seen = ();
 
 sub prompt {
-    shift;
-
-    # Infinite loop protection
-    my @c = caller();
-    if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
-        die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
-    }
-
-    # In automated testing, always use defaults
-    if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
-        local $ENV{PERL_MM_USE_DEFAULT} = 1;
-        goto &ExtUtils::MakeMaker::prompt;
-    } else {
-        goto &ExtUtils::MakeMaker::prompt;
-    }
+	shift;
+
+	# Infinite loop protection
+	my @c = caller();
+	if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
+		die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
+	}
+
+	# In automated testing, always use defaults
+	if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
+		local $ENV{PERL_MM_USE_DEFAULT} = 1;
+		goto &ExtUtils::MakeMaker::prompt;
+	} else {
+		goto &ExtUtils::MakeMaker::prompt;
+	}
 }
 
 sub makemaker_args {
-    my $self = shift;
-    my $args = ($self->{makemaker_args} ||= {});
-    %$args = ( %$args, @_ ) if @_;
-    $args;
+	my $self = shift;
+	my $args = ($self->{makemaker_args} ||= {});
+	%$args = ( %$args, @_ ) if @_;
+	$args;
 }
 
 # For mm args that take multiple space-seperated args,
 # append an argument to the current list.
 sub makemaker_append {
-    my $self = shift;
-    my $name = shift;
-    my $args = $self->makemaker_args;
-    $args->{name} = defined $args->{$name}
-    	? join( ' ', $args->{name}, @_ )
-    	: join( ' ', @_ );
+	my $self = sShift;
+	my $name = shift;
+	my $args = $self->makemaker_args;
+	$args->{name} = defined $args->{$name}
+		? join( ' ', $args->{name}, @_ )
+		: join( ' ', @_ );
 }
 
 sub build_subdirs {
-    my $self    = shift;
-    my $subdirs = $self->makemaker_args->{DIR} ||= [];
-    for my $subdir (@_) {
-        push @$subdirs, $subdir;
-    }
+	my $self    = shift;
+	my $subdirs = $self->makemaker_args->{DIR} ||= [];
+	for my $subdir (@_) {
+		push @$subdirs, $subdir;
+	}
 }
 
 sub clean_files {
-    my $self  = shift;
-    my $clean = $self->makemaker_args->{clean} ||= {};
-    %$clean = (
-        %$clean, 
-        FILES => join(' ', grep length, $clean->{FILES}, @_),
-    );
+	my $self  = shift;
+	my $clean = $self->makemaker_args->{clean} ||= {};
+	%$clean = (
+		%$clean, 
+		FILES => join(' ', grep length, $clean->{FILES}, @_),
+	);
 }
 
 sub realclean_files {
-    my $self  = shift;
-    my $realclean = $self->makemaker_args->{realclean} ||= {};
-    %$realclean = (
-        %$realclean, 
-        FILES => join(' ', grep length, $realclean->{FILES}, @_),
-    );
+	my $self  = shift;
+	my $realclean = $self->makemaker_args->{realclean} ||= {};
+	%$realclean = (
+		%$realclean, 
+		FILES => join(' ', grep length, $realclean->{FILES}, @_),
+	);
 }
 
 sub libs {
-    my $self = shift;
-    my $libs = ref $_[0] ? shift : [ shift ];
-    $self->makemaker_args( LIBS => $libs );
+	my $self = shift;
+	my $libs = ref $_[0] ? shift : [ shift ];
+	$self->makemaker_args( LIBS => $libs );
 }
 
 sub inc {
-    my $self = shift;
-    $self->makemaker_args( INC => shift );
+	my $self = shift;
+	$self->makemaker_args( INC => shift );
+}
+
+my %test_dir = ();
+
+sub _wanted_t {
+	/\.t$/ and -f $_ and $test_dir{$File::Find::dir} = 1;
+}
+
+sub tests_recursive {
+	my $self = shift;
+	if ( $self->tests ) {
+		die "tests_recursive will not work if tests are already defined";
+	}
+	my $dir = shift || 't';
+	unless ( -d $dir ) {
+		die "tests_recursive dir '$dir' does not exist";
+	}
+	require File::Find;
+	%test_dir = ();
+	File::Find::find( \&_wanted_t, $dir );
+	$self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir );
 }
 
 sub write {
-    my $self = shift;
-    die "&Makefile->write() takes no arguments\n" if @_;
-
-    my $args = $self->makemaker_args;
-    $args->{DISTNAME} = $self->name;
-    $args->{NAME}     = $self->module_name || $self->name || $self->determine_NAME($args);
-    $args->{VERSION}  = $self->version || $self->determine_VERSION($args);
-    $args->{NAME}     =~ s/-/::/g;
-    if ( $self->tests ) {
-        $args->{test} = { TESTS => $self->tests };
-    }
-    if ($] >= 5.005) {
-        $args->{ABSTRACT} = $self->abstract;
-        $args->{AUTHOR}   = $self->author;
-    }
-    if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
-        $args->{NO_META} = 1;
-    }
-    if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
-        $args->{SIGN} = 1;
-    }
-    unless ( $self->is_admin ) {
-        delete $args->{SIGN};
-    }
-
-    # merge both kinds of requires into prereq_pm
-    my $prereq = ($args->{PREREQ_PM} ||= {});
-    %$prereq = ( %$prereq, map { @$_ } map { @$_ } grep $_,
-                 ($self->build_requires, $self->requires) );
-
-    # merge both kinds of requires into prereq_pm
-    my $subdirs = ($args->{DIR} ||= []);
-    if ($self->bundles) {
-        foreach my $bundle (@{ $self->bundles }) {
-            my ($file, $dir) = @$bundle;
-            push @$subdirs, $dir if -d $dir;
-            delete $prereq->{$file};
-        }
-    }
-
-    if ( my $perl_version = $self->perl_version ) {
-        eval "use $perl_version; 1"
-            or die "ERROR: perl: Version $] is installed, "
-                . "but we need version >= $perl_version";
-    }
-
-    my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
-    if ($self->admin->preop) {
-        $args{dist} = $self->admin->preop;
-    }
-
-    my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
-    $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
+	my $self = shift;
+	die "&Makefile->write() takes no arguments\n" if @_;
+
+	my $args = $self->makemaker_args;
+	$args->{DISTNAME} = $self->name;
+	$args->{NAME}     = $self->module_name || $self->name || $self->determine_NAME($args);
+	$args->{VERSION}  = $self->version || $self->determine_VERSION($args);
+	$args->{NAME}     =~ s/-/::/g;
+	if ( $self->tests ) {
+		$args->{test} = { TESTS => $self->tests };
+	}
+	if ($] >= 5.005) {
+		$args->{ABSTRACT} = $self->abstract;
+		$args->{AUTHOR}   = $self->author;
+	}
+	if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
+		$args->{NO_META} = 1;
+	}
+	if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
+		$args->{SIGN} = 1;
+	}
+	unless ( $self->is_admin ) {
+		delete $args->{SIGN};
+	}
+
+	# merge both kinds of requires into prereq_pm
+	my $prereq = ($args->{PREREQ_PM} ||= {});
+	%$prereq = ( %$prereq,
+		map { @$_ }
+		map { @$_ }
+		grep $_,
+		($self->build_requires, $self->requires)
+	);
+
+	# merge both kinds of requires into prereq_pm
+	my $subdirs = ($args->{DIR} ||= []);
+	if ($self->bundles) {
+		foreach my $bundle (@{ $self->bundles }) {
+			my ($file, $dir) = @$bundle;
+			push @$subdirs, $dir if -d $dir;
+			delete $prereq->{$file};
+		}
+	}
+
+	if ( my $perl_version = $self->perl_version ) {
+		eval "use $perl_version; 1"
+			or die "ERROR: perl: Version $] is installed, "
+			. "but we need version >= $perl_version";
+	}
+
+	$args->{INSTALLDIRS} = $self->installdirs;
+
+	my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
+
+	my $user_preop = delete $args{dist}->{PREOP};
+	if (my $preop = $self->admin->preop($user_preop)) {
+		$args{dist} = $preop;
+	}
+
+	my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
+	$self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
 }
 
 sub fix_up_makefile {
-    my $self          = shift;
-    my $makefile_name = shift;
-    my $top_class     = ref($self->_top) || '';
-    my $top_version   = $self->_top->VERSION || '';
-
-    my $preamble = $self->preamble 
-        ? "# Preamble by $top_class $top_version\n"
-            . $self->preamble
-        : '';
-    my $postamble = "# Postamble by $top_class $top_version\n"
-        . ($self->postamble || '');
-
-    local *MAKEFILE;
-    open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
-    my $makefile = do { local $/; <MAKEFILE> };
-    close MAKEFILE or die $!;
-
-    $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
-    $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
-    $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
-    $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
-    $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
-
-    # Module::Install will never be used to build the Core Perl
-    # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
-    # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
-    $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
-    #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
-
-    # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
-    $makefile =~ s/("?)-I\$\(PERL_LIB\)\1//g;
-
-    # XXX - This is currently unused; not sure if it breaks other MM-users
-    # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
-
-    open  MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
-    print MAKEFILE  "$preamble$makefile$postamble" or die $!;
-    close MAKEFILE  or die $!;
-
-    1;
+	my $self          = shift;
+	my $makefile_name = shift;
+	my $top_class     = ref($self->_top) || '';
+	my $top_version   = $self->_top->VERSION || '';
+
+	my $preamble = $self->preamble 
+		? "# Preamble by $top_class $top_version\n"
+			. $self->preamble
+		: '';
+	my $postamble = "# Postamble by $top_class $top_version\n"
+		. ($self->postamble || '');
+
+	local *MAKEFILE;
+	open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
+	my $makefile = do { local $/; <MAKEFILE> };
+	close MAKEFILE or die $!;
+
+	$makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
+	$makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
+	$makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
+	$makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
+	$makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
+
+	# Module::Install will never be used to build the Core Perl
+	# Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
+	# PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
+	$makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
+	#$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
+
+	# Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
+	$makefile =~ s/("?)-I\$\(PERL_LIB\)\1//g;
+
+	# XXX - This is currently unused; not sure if it breaks other MM-users
+	# $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
+
+	open  MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
+	print MAKEFILE  "$preamble$makefile$postamble" or die $!;
+	close MAKEFILE  or die $!;
+
+	1;
 }
 
 sub preamble {
-    my ($self, $text) = @_;
-    $self->{preamble} = $text . $self->{preamble} if defined $text;
-    $self->{preamble};
+	my ($self, $text) = @_;
+	$self->{preamble} = $text . $self->{preamble} if defined $text;
+	$self->{preamble};
 }
 
 sub postamble {
-    my ($self, $text) = @_;
-    $self->{postamble} ||= $self->admin->postamble;
-    $self->{postamble} .= $text if defined $text;
-    $self->{postamble}
+	my ($self, $text) = @_;
+	$self->{postamble} ||= $self->admin->postamble;
+	$self->{postamble} .= $text if defined $text;
+	$self->{postamble}
 }
 
 1;
 
 __END__
 
-#line 334
+#line 363

Modified: trunk/libtime-duration-parse-perl/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/inc/Module/Install/Metadata.pm?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/inc/Module/Install/Metadata.pm (original)
+++ trunk/libtime-duration-parse-perl/inc/Module/Install/Metadata.pm Sun Jun  1 19:20:24 2008
@@ -6,14 +6,14 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.64';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
 
 my @scalar_keys = qw{
     name module_name abstract author version license
-    distribution_type perl_version tests
+    distribution_type perl_version tests installdirs
 };
 
 my @tuple_keys = qw{
@@ -56,9 +56,23 @@
     };
 }
 
+# configure_requires is currently a null-op
+sub configure_requires { 1 }
+
+# Aliases for build_requires that will have alternative
+# meanings in some future version of META.yml.
+sub test_requires      { shift->build_requires(@_)  }
+sub install_requires   { shift->build_requires(@_)  }
+
+# Aliases for installdirs options
+sub install_as_core    { $_[0]->installdirs('perl')   }
+sub install_as_cpan    { $_[0]->installdirs('site')   }
+sub install_as_site    { $_[0]->installdirs('site')   }
+sub install_as_vendor  { $_[0]->installdirs('vendor') }
+
 sub sign {
     my $self = shift;
-    return $self->{'values'}{'sign'} if defined wantarray and !@_;
+    return $self->{'values'}{'sign'} if defined wantarray and ! @_;
     $self->{'values'}{'sign'} = ( @_ ? $_[0] : 1 );
     return $self;
 }
@@ -279,9 +293,11 @@
 
     if (
         $self->_slurp($file) =~ m/
-        =head \d \s+
-        (?:licen[cs]e|licensing|copyright|legal)\b
-        (.*?)
+        (
+            =head \d \s+
+            (?:licen[cs]e|licensing|copyright|legal)\b
+            .*?
+        )
         (=head\\d.*|=cut.*|)
         \z
     /ixms
@@ -289,19 +305,24 @@
     {
         my $license_text = $1;
         my @phrases      = (
-            'under the same (?:terms|license) as perl itself' => 'perl',
-            'GNU public license'                              => 'gpl',
-            'GNU lesser public license'                       => 'gpl',
-            'BSD license'                                     => 'bsd',
-            'Artistic license'                                => 'artistic',
-            'GPL'                                             => 'gpl',
-            'LGPL'                                            => 'lgpl',
-            'BSD'                                             => 'bsd',
-            'Artistic'                                        => 'artistic',
+            'under the same (?:terms|license) as perl itself' => 'perl',        1,
+            'GNU public license'                              => 'gpl',         1,
+            'GNU lesser public license'                       => 'gpl',         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 ) = splice( @phrases, 0, 2 ) ) {
+        while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
             $pattern =~ s{\s+}{\\s+}g;
             if ( $license_text =~ /\b$pattern\b/i ) {
+                if ( $osi and $license_text =~ /All rights reserved/i ) {
+                        warn "LEGAL WARNING: 'All rights reserved' may invalidate Open Source licenses. Consider removing it.";
+		}
                 $self->license($license);
                 return 1;
             }

Modified: trunk/libtime-duration-parse-perl/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/inc/Module/Install/Win32.pm?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/inc/Module/Install/Win32.pm (original)
+++ trunk/libtime-duration-parse-perl/inc/Module/Install/Win32.pm Sun Jun  1 19:20:24 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.64';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: trunk/libtime-duration-parse-perl/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/inc/Module/Install/WriteAll.pm?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/inc/Module/Install/WriteAll.pm (original)
+++ trunk/libtime-duration-parse-perl/inc/Module/Install/WriteAll.pm Sun Jun  1 19:20:24 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.64';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: trunk/libtime-duration-parse-perl/inc/Test/More.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/inc/Test/More.pm?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/inc/Test/More.pm (original)
+++ trunk/libtime-duration-parse-perl/inc/Test/More.pm Sun Jun  1 19:20:24 2008
@@ -17,7 +17,7 @@
 
 
 use vars qw($VERSION @ISA @EXPORT %EXPORT_TAGS $TODO);
-$VERSION = '0.72';
+$VERSION = '0.74';
 $VERSION = eval $VERSION;    # make the alpha version come out as a number
 
 use Test::Builder::Module;
@@ -233,32 +233,37 @@
 
     my($pack,$filename,$line) = caller;
 
-    local($@,$!,$SIG{__DIE__});   # isolate eval
-
-    if( @imports == 1 and $imports[0] =~ /^\d+(?:\.\d+)?$/ ) {
-        # probably a version check.  Perl needs to see the bare number
-        # for it to work with non-Exporter based modules.
-        eval <<USE;
+    # Work around a glitch in $@ and eval
+    my $eval_error;
+    {
+        local($@,$!,$SIG{__DIE__});   # isolate eval
+
+        if( @imports == 1 and $imports[0] =~ /^\d+(?:\.\d+)?$/ ) {
+            # probably a version check.  Perl needs to see the bare number
+            # for it to work with non-Exporter based modules.
+            eval <<USE;
 package $pack;
 use $module $imports[0];
 USE
-    }
-    else {
-        eval <<USE;
+        }
+        else {
+            eval <<USE;
 package $pack;
 use $module \@imports;
 USE
-    }
-
-    my $ok = $tb->ok( !$@, "use $module;" );
+        }
+        $eval_error = $@;
+    }
+
+    my $ok = $tb->ok( !$eval_error, "use $module;" );
 
     unless( $ok ) {
-        chomp $@;
+        chomp $eval_error;
         $@ =~ s{^BEGIN failed--compilation aborted at .*$}
                 {BEGIN failed--compilation aborted at $filename line $line.}m;
         $tb->diag(<<DIAGNOSTIC);
     Tried to use '$module'.
-    Error:  $@
+    Error:  $eval_error
 DIAGNOSTIC
 
     }
@@ -266,7 +271,7 @@
     return $ok;
 }
 
-#line 702
+#line 707
 
 sub require_ok ($) {
     my($module) = shift;
@@ -310,7 +315,7 @@
     $module =~ /^[a-zA-Z]\w*$/;
 }
 
-#line 779
+#line 784
 
 use vars qw(@Data_Stack %Refs_Seen);
 my $DNE = bless [], 'Does::Not::Exist';
@@ -417,7 +422,7 @@
     return '';
 }
 
-#line 925
+#line 930
 
 sub diag {
     my $tb = Test::More->builder;
@@ -426,7 +431,7 @@
 }
 
 
-#line 994
+#line 999
 
 #'#
 sub skip {
@@ -454,7 +459,7 @@
 }
 
 
-#line 1081
+#line 1086
 
 sub todo_skip {
     my($why, $how_many) = @_;
@@ -475,7 +480,7 @@
     last TODO;
 }
 
-#line 1134
+#line 1139
 
 sub BAIL_OUT {
     my $reason = shift;
@@ -484,7 +489,7 @@
     $tb->BAIL_OUT($reason);
 }
 
-#line 1173
+#line 1178
 
 #'#
 sub eq_array {
@@ -608,7 +613,7 @@
 }
 
 
-#line 1304
+#line 1309
 
 sub eq_hash {
     local @Data_Stack;
@@ -641,7 +646,7 @@
     return $ok;
 }
 
-#line 1361
+#line 1366
 
 sub eq_set  {
     my($a1, $a2) = @_;
@@ -667,6 +672,6 @@
     );
 }
 
-#line 1551
+#line 1556
 
 1;

Modified: trunk/libtime-duration-parse-perl/inc/Time/Duration.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/inc/Time/Duration.pm?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/inc/Time/Duration.pm (original)
+++ trunk/libtime-duration-parse-perl/inc/Time/Duration.pm Sun Jun  1 19:20:24 2008
@@ -2,7 +2,7 @@
 
 package Time::Duration;
 # POD is at the end.
-$VERSION = '1.04';
+$VERSION = '1.06';
 require Exporter;
 @ISA = ('Exporter');
 @EXPORT = qw( later later_exact earlier earlier_exact

Modified: trunk/libtime-duration-parse-perl/lib/Time/Duration/Parse.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/lib/Time/Duration/Parse.pm?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/lib/Time/Duration/Parse.pm (original)
+++ trunk/libtime-duration-parse-perl/lib/Time/Duration/Parse.pm Sun Jun  1 19:20:24 2008
@@ -1,7 +1,7 @@
 package Time::Duration::Parse;
 
 use strict;
-our $VERSION = '0.05';
+our $VERSION = '0.06';
 
 use Carp;
 use Exporter::Lite;
@@ -20,9 +20,9 @@
 sub parse_duration {
     my $timespec = shift;
 
-    # Treat plain integer as number of seconds
-    if ($timespec =~ /^-?\d+$/) {
-        return $timespec;
+    # Treat a plain number as a number of seconds (and parse it later)
+    if ($timespec =~ /^\s*(-?\d+(?:[.,]\d+)?)\s*$/) {
+        $timespec = "$1s";
     }
 
     # Convert hh:mm(:ss)? to something we understand
@@ -30,11 +30,12 @@
     $timespec =~ s/\b(\d+):(\d\d)\b/$1h $2m/g;
 
     my $duration = 0;
-    while ($timespec =~ s/^\s*(-?\d+)\s*([a-zA-Z]+)(?:\s*(?:,|and)\s*)*//i) {
+    while ($timespec =~ s/^\s*(-?\d+(?:[.,]\d+)?)\s*([a-zA-Z]+)(?:\s*(?:,|and)\s*)*//i) {
         my($amount, $unit) = ($1, $2);
         $unit = lc($unit) unless length($unit) == 1;
 
         if (my $value = $Units{$unit}) {
+            $amount =~ s/,/./;
             $duration += $amount * $value;
         } else {
             Carp::croak "Unknown timespec: $1 $2";
@@ -45,7 +46,7 @@
         Carp::croak "Unknown timespec: $timespec";
     }
 
-    return $duration;
+    return sprintf "%.0f", $duration;
 }
 
 1;

Modified: trunk/libtime-duration-parse-perl/t/01_parse.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-duration-parse-perl/t/01_parse.t?rev=20622&op=diff
==============================================================================
--- trunk/libtime-duration-parse-perl/t/01_parse.t (original)
+++ trunk/libtime-duration-parse-perl/t/01_parse.t Sun Jun  1 19:20:24 2008
@@ -1,5 +1,5 @@
 use strict;
-use Test::More tests => 22;
+use Test::More tests => 37;
 
 use Time::Duration::Parse;
 
@@ -36,6 +36,23 @@
 ok_duration '2:03', 7380;
 
 ok_duration ' 1s   ', 1;
+ok_duration '   1  ', 1;
+ok_duration '  1.3 ', 1;
+
+ok_duration '1.5h', 5400;
+ok_duration '1,5h', 5400;
+ok_duration '1.5h 30m', 7200;
+ok_duration '1.9s', 2;          # Check rounding
+ok_duration '1.3s', 1;
+ok_duration '1.3', 1;
+ok_duration '1.9', 2;
+
+ok_duration '1h,30m, 3s', 5403;
+ok_duration '1h and 30m,3s', 5403;
+ok_duration '1,5h, 3s', 5403;
+ok_duration '1,5h and 3s', 5403;
+ok_duration '1.5h, 3s', 5403;
+ok_duration '1.5h and 3s', 5403;
 
 fail_duration '3 sss';
 fail_duration '6 minutes and 3 sss';




More information about the Pkg-perl-cvs-commits mailing list