r75019 - in /branches/upstream/libdatetime-format-pg-perl/current: ./ inc/Module/ inc/Module/Install/ lib/DateTime/Format/ t/

ansgar at users.alioth.debian.org ansgar at users.alioth.debian.org
Thu Jun 2 11:09:36 UTC 2011


Author: ansgar
Date: Thu Jun  2 11:09:30 2011
New Revision: 75019

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=75019
Log:
[svn-upgrade] new version libdatetime-format-pg-perl (0.16006)

Added:
    branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Repository.pm
Removed:
    branches/upstream/libdatetime-format-pg-perl/current/README
Modified:
    branches/upstream/libdatetime-format-pg-perl/current/Changes
    branches/upstream/libdatetime-format-pg-perl/current/MANIFEST
    branches/upstream/libdatetime-format-pg-perl/current/META.yml
    branches/upstream/libdatetime-format-pg-perl/current/Makefile.PL
    branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install.pm
    branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Base.pm
    branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Can.pm
    branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Fetch.pm
    branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Makefile.pm
    branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Metadata.pm
    branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Win32.pm
    branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/WriteAll.pm
    branches/upstream/libdatetime-format-pg-perl/current/lib/DateTime/Format/Pg.pm
    branches/upstream/libdatetime-format-pg-perl/current/t/format_date.t
    branches/upstream/libdatetime-format-pg-perl/current/t/parse_infinity.t

Modified: branches/upstream/libdatetime-format-pg-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/Changes?rev=75019&op=diff
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/Changes (original)
+++ branches/upstream/libdatetime-format-pg-perl/current/Changes Thu Jun  2 11:09:30 2011
@@ -1,4 +1,9 @@
 Revision history for Perl extension DateTime::Format::Pg.
+
+0.16006  Fri May 27 09:00:00 2011
+    - Repository moved to github
+    - Postgres 8.4 apprently now allows infinity dates. 
+      Applied patch by cmckay (rt #68473)
 
 0.16005  Wed Jun 23 12:15:00 2010
     - Fix edge case in fractional seconds (rt #58612).

Modified: branches/upstream/libdatetime-format-pg-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/MANIFEST?rev=75019&op=diff
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/MANIFEST (original)
+++ branches/upstream/libdatetime-format-pg-perl/current/MANIFEST Thu Jun  2 11:09:30 2011
@@ -5,6 +5,7 @@
 inc/Module/Install/Fetch.pm
 inc/Module/Install/Makefile.pm
 inc/Module/Install/Metadata.pm
+inc/Module/Install/Repository.pm
 inc/Module/Install/Win32.pm
 inc/Module/Install/WriteAll.pm
 lib/DateTime/Format/Pg.pm
@@ -12,15 +13,14 @@
 Makefile.PL
 MANIFEST			This list of files
 META.yml
-README
 t/1basic.t
 t/2new-param.t
 t/99-pod-coverage.t
 t/99-pod.t
 t/format_date.t
 t/format_datetime.t
+t/format_fractional.t
 t/format_interval.t
-t/format_fractional.t
 t/parse_date.t
 t/parse_datetime.t
 t/parse_datetime2.t

Modified: branches/upstream/libdatetime-format-pg-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/META.yml?rev=75019&op=diff
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/META.yml (original)
+++ branches/upstream/libdatetime-format-pg-perl/current/META.yml Thu Jun  2 11:09:30 2011
@@ -8,7 +8,7 @@
 configure_requires:
   ExtUtils::MakeMaker: 6.42
 distribution_type: module
-generated_by: 'Module::Install version 1.00'
+generated_by: 'Module::Install version 1.01'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -24,4 +24,5 @@
   DateTime::TimeZone: 0.05
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.16005
+  repository: git://github.com/lestrrat/DateTime-Format-Pg.git
+version: 0.16006

Modified: branches/upstream/libdatetime-format-pg-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/Makefile.PL?rev=75019&op=diff
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/Makefile.PL (original)
+++ branches/upstream/libdatetime-format-pg-perl/current/Makefile.PL Thu Jun  2 11:09:30 2011
@@ -9,6 +9,7 @@
 requires 'DateTime::TimeZone' => '0.05';
 
 test_requires 'Test::More';
+auto_set_repository;
 
 WriteAll;
 

Modified: branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install.pm?rev=75019&op=diff
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install.pm Thu Jun  2 11:09:30 2011
@@ -31,7 +31,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 = '1.00';
+	$VERSION = '1.01';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;
@@ -467,4 +467,4 @@
 
 1;
 
-# Copyright 2008 - 2010 Adam Kennedy.
+# Copyright 2008 - 2011 Adam Kennedy.

Modified: branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Base.pm?rev=75019&op=diff
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Base.pm Thu Jun  2 11:09:30 2011
@@ -4,7 +4,7 @@
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 }
 
 # Suspend handler for "redefined" warnings

Modified: branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Can.pm?rev=75019&op=diff
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Can.pm Thu Jun  2 11:09:30 2011
@@ -9,7 +9,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Fetch.pm?rev=75019&op=diff
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Fetch.pm Thu Jun  2 11:09:30 2011
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Makefile.pm?rev=75019&op=diff
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Makefile.pm Thu Jun  2 11:09:30 2011
@@ -8,7 +8,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Metadata.pm?rev=75019&op=diff
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Metadata.pm Thu Jun  2 11:09:30 2011
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -515,6 +515,7 @@
 		'GNU Free Documentation license'     => 'unrestricted', 1,
 		'GNU Affero General Public License'  => 'open_source',  1,
 		'(?:Free)?BSD license'               => 'bsd',          1,
+		'Artistic license 2\.0'              => 'artistic_2',   1,
 		'Artistic license'                   => 'artistic',     1,
 		'Apache (?:Software )?license'       => 'apache',       1,
 		'GPL'                                => 'gpl',          1,
@@ -550,9 +551,9 @@
 
 sub _extract_bugtracker {
 	my @links   = $_[0] =~ m#L<(
-	 \Qhttp://rt.cpan.org/\E[^>]+|
-	 \Qhttp://github.com/\E[\w_]+/[\w_]+/issues|
-	 \Qhttp://code.google.com/p/\E[\w_\-]+/issues/list
+	 https?\Q://rt.cpan.org/\E[^>]+|
+	 https?\Q://github.com/\E[\w_]+/[\w_]+/issues|
+	 https?\Q://code.google.com/p/\E[\w_\-]+/issues/list
 	 )>#gx;
 	my %links;
 	@links{@links}=();

Added: branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Repository.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Repository.pm?rev=75019&op=file
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Repository.pm (added)
+++ branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Repository.pm Thu Jun  2 11:09:30 2011
@@ -1,0 +1,88 @@
+#line 1
+package Module::Install::Repository;
+
+use strict;
+use 5.005;
+use vars qw($VERSION);
+$VERSION = '0.06';
+
+use base qw(Module::Install::Base);
+
+sub _execute {
+    my ($command) = @_;
+    `$command`;
+}
+
+sub auto_set_repository {
+    my $self = shift;
+
+    return unless $Module::Install::AUTHOR;
+
+    my $repo = _find_repo(\&_execute);
+    if ($repo) {
+        $self->repository($repo);
+    } else {
+        warn "Cannot determine repository URL\n";
+    }
+}
+
+sub _find_repo {
+    my ($execute) = @_;
+
+    if (-e ".git") {
+        # TODO support remote besides 'origin'?
+        if ($execute->('git remote show -n origin') =~ /URL: (.*)$/m) {
+            # XXX Make it public clone URL, but this only works with github
+            my $git_url = $1;
+            $git_url =~ s![\w\-]+\@([^:]+):!git://$1/!;
+            return $git_url;
+        } elsif ($execute->('git svn info') =~ /URL: (.*)$/m) {
+            return $1;
+        }
+    } elsif (-e ".svn") {
+        if (`svn info` =~ /URL: (.*)$/m) {
+            return $1;
+        }
+    } elsif (-e "_darcs") {
+        # defaultrepo is better, but that is more likely to be ssh, not http
+        if (my $query_repo = `darcs query repo`) {
+            if ($query_repo =~ m!Default Remote: (http://.+)!) {
+                return $1;
+            }
+        }
+
+        open my $handle, '<', '_darcs/prefs/repos' or return;
+        while (<$handle>) {
+            chomp;
+            return $_ if m!^http://!;
+        }
+    } elsif (-e ".hg") {
+        if ($execute->('hg paths') =~ /default = (.*)$/m) {
+            my $mercurial_url = $1;
+            $mercurial_url =~ s!^ssh://hg\@(bitbucket\.org/)!https://$1!;
+            return $mercurial_url;
+        }
+    } elsif (-e "$ENV{HOME}/.svk") {
+        # Is there an explicit way to check if it's an svk checkout?
+        my $svk_info = `svk info` or return;
+        SVK_INFO: {
+            if ($svk_info =~ /Mirrored From: (.*), Rev\./) {
+                return $1;
+            }
+
+            if ($svk_info =~ m!Merged From: (/mirror/.*), Rev\.!) {
+                $svk_info = `svk info /$1` or return;
+                redo SVK_INFO;
+            }
+        }
+
+        return;
+    }
+}
+
+1;
+__END__
+
+=encoding utf-8
+
+#line 128

Modified: branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Win32.pm?rev=75019&op=diff
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/Win32.pm Thu Jun  2 11:09:30 2011
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/WriteAll.pm?rev=75019&op=diff
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/libdatetime-format-pg-perl/current/inc/Module/Install/WriteAll.pm Thu Jun  2 11:09:30 2011
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.00';
+	$VERSION = '1.01';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libdatetime-format-pg-perl/current/lib/DateTime/Format/Pg.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/lib/DateTime/Format/Pg.pm?rev=75019&op=diff
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/lib/DateTime/Format/Pg.pm (original)
+++ branches/upstream/libdatetime-format-pg-perl/current/lib/DateTime/Format/Pg.pm Thu Jun  2 11:09:30 2011
@@ -1,5 +1,4 @@
 package DateTime::Format::Pg;
-# $Id: Pg.pm 4436 2010-06-23 03:14:18Z lestrrat $
 
 use strict;
 use vars qw ($VERSION);
@@ -12,7 +11,7 @@
 use DateTime::TimeZone::UTC;
 use DateTime::TimeZone::Floating;
 
-$VERSION = '0.16005';
+$VERSION = '0.16006';
 $VERSION = eval $VERSION;
 
 our @ISA = ('DateTime::Format::Builder');
@@ -373,7 +372,7 @@
   parsers =>
   {
     parse_date		=> [ $pg_dateonly_iso, $pg_dateonly_sql,
-    			     $pg_dateonly_german, ],
+    			     $pg_dateonly_german, $pg_infinity ],
     parse_timetz	=> [ $pg_timeonly, ],
     parse_timestamptz	=> [ $pg_datetime_iso, $pg_datetime_pg_eu,
                              $pg_datetime_pg_us, $pg_datetime_sql,
@@ -693,7 +692,9 @@
 sub format_date
 {
   my ($self,$dt) = @_;
-  if($dt->year()<=0) {
+  if($dt->is_infinite) {
+    return $dt->isa('DateTime::Infinite::Future') ? 'infinity' : '-infinity';
+  } elsif($dt->year()<=0) {
     return sprintf('%04d-%02d-%02d BC',
       1-$dt->year(),
       $dt->month(),

Modified: branches/upstream/libdatetime-format-pg-perl/current/t/format_date.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/t/format_date.t?rev=75019&op=diff
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/t/format_date.t (original)
+++ branches/upstream/libdatetime-format-pg-perl/current/t/format_date.t Thu Jun  2 11:09:30 2011
@@ -1,5 +1,5 @@
 # $Id: format_date.t 1039 2003-05-30 14:04:49Z cfaerber $
-use Test::More tests => 3;
+use Test::More tests => 5;
 use DateTime 0.10;
 use DateTime::Format::Pg 0.02;
 
@@ -24,3 +24,13 @@
   my $dt = DateTime->new( %{$tests{$result}} );
   is( DateTime::Format::Pg->format_date($dt), $result );
 }
+
+is(
+    DateTime::Format::Pg->format_date(DateTime::Infinite::Future->new),
+    'infinity'
+);
+
+is(
+    DateTime::Format::Pg->format_date(DateTime::Infinite::Past->new),
+    '-infinity'
+);

Modified: branches/upstream/libdatetime-format-pg-perl/current/t/parse_infinity.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdatetime-format-pg-perl/current/t/parse_infinity.t?rev=75019&op=diff
==============================================================================
--- branches/upstream/libdatetime-format-pg-perl/current/t/parse_infinity.t (original)
+++ branches/upstream/libdatetime-format-pg-perl/current/t/parse_infinity.t Thu Jun  2 11:09:30 2011
@@ -1,9 +1,14 @@
 # $Id: parse_infinity.t 1061 2006-01-07 00:45:49Z lestrrat $
-use Test::More tests => 4;
+use Test::More tests => 6;
 use DateTime::Format::Pg 0.02;
 
 {
   my $dt = DateTime::Format::Pg->parse_datetime('infinity');
+  isa_ok($dt, 'DateTime::Infinite::Future');
+}
+
+{
+  my $dt = DateTime::Format::Pg->parse_date('infinity');
   isa_ok($dt, 'DateTime::Infinite::Future');
 }
 
@@ -18,6 +23,11 @@
 }
 
 {
+  my $dt = DateTime::Format::Pg->parse_date('-infinity');
+  isa_ok($dt, 'DateTime::Infinite::Past');
+}
+
+{
   my $dt = DateTime::Format::Pg->parse_timestamp('-infinity');
   isa_ok($dt, 'DateTime::Infinite::Past');
 }




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