r54658 - in /trunk/libtime-clock-perl: Changes META.yml Makefile.PL debian/changelog debian/compat debian/control debian/copyright debian/rules debian/source/ debian/source/format lib/Time/Clock.pm t/format.t

ansgar-guest at users.alioth.debian.org ansgar-guest at users.alioth.debian.org
Tue Mar 23 03:34:00 UTC 2010


Author: ansgar-guest
Date: Tue Mar 23 03:33:31 2010
New Revision: 54658

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=54658
Log:
* New upstream release.
* Use source format 3.0 (quilt).
* Refresh rules for debhelper 7.
* Convert debian/copyright to proposed machine-readable format
  and update years of copyright.
* debian/control: Make build-dep on perl unversioned.
* debian/control: Remove trailing ", " from Depends: field.
* Add myself to Uploaders.
* Bump Standard-Version to 3.8.4.

Added:
    trunk/libtime-clock-perl/debian/source/
    trunk/libtime-clock-perl/debian/source/format
Modified:
    trunk/libtime-clock-perl/Changes
    trunk/libtime-clock-perl/META.yml
    trunk/libtime-clock-perl/Makefile.PL
    trunk/libtime-clock-perl/debian/changelog
    trunk/libtime-clock-perl/debian/compat
    trunk/libtime-clock-perl/debian/control
    trunk/libtime-clock-perl/debian/copyright
    trunk/libtime-clock-perl/debian/rules
    trunk/libtime-clock-perl/lib/Time/Clock.pm
    trunk/libtime-clock-perl/t/format.t

Modified: trunk/libtime-clock-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/Changes?rev=54658&op=diff
==============================================================================
--- trunk/libtime-clock-perl/Changes (original)
+++ trunk/libtime-clock-perl/Changes Tue Mar 23 03:33:31 2010
@@ -1,6 +1,12 @@
-0.12 (02.01.2008) - John Siracusa <siracusa at gmail.com>
+1.00 (03.09.2010) - John Siracusa <siracusa at gmail.com>
 
-    * Updated the maintainer's email address.
+    * The %i format now correctly shows 12 for 12 AM.
+    * Removed leading zeros from the %i format.
+    * Bumped version number to reflect API stability.
+
+0.12 (10.16.2009) - John Siracusa <siracusa at gmail.com>
+
+    * Updated eval block to avoid stomping on $@ from an outer scope.
 
 0.11 (08.24.2006) - John Siracusa <siracusa at gmail.com>
 

Modified: trunk/libtime-clock-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/META.yml?rev=54658&op=diff
==============================================================================
--- trunk/libtime-clock-perl/META.yml (original)
+++ trunk/libtime-clock-perl/META.yml Tue Mar 23 03:33:31 2010
@@ -1,11 +1,26 @@
 --- #YAML:1.0
-name:                Time-Clock
-version:             0.12
-abstract:            ~
-license:             ~
-generated_by:        ExtUtils::MakeMaker version 6.36
-distribution_type:   module
-requires:     
+name:               Time-Clock
+version:            1.00
+abstract:           Twenty-four hour clock object with nanosecond precision.
+author:
+    - John Siracusa <siracusa at gmail.com>
+license:            perl
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
+requires:
+    perl:  5.006000
+resources:
+    bugtracker:  http://rt.cpan.org/NoAuth/Bugs.html?Dist=Time-Clock
+    license:     http://dev.perl.org/licenses/
+    repository:  http://rose.googlecode.com/svn/trunk/modules/Time-Clock
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.56
 meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.2.html
-    version: 1.2
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: trunk/libtime-clock-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/Makefile.PL?rev=54658&op=diff
==============================================================================
--- trunk/libtime-clock-perl/Makefile.PL (original)
+++ trunk/libtime-clock-perl/Makefile.PL Tue Mar 23 03:33:31 2010
@@ -2,8 +2,28 @@
 
 use ExtUtils::MakeMaker;
 
+my $MM_Version = $ExtUtils::MakeMaker::VERSION;
+
+if($MM_Version =~ /_/) # dev version
+{
+  $MM_Version = eval $MM_Version;
+  die $@  if($@);
+}
+
 WriteMakefile(NAME         => 'Time::Clock',
-              ($^O =~ /darwin/i ?
-               (dist => { DIST_CP => 'cp' }) : ()), # Avoid Mac OS X ._* files
-              PMLIBDIRS    => [ 'lib' ],
-              VERSION_FROM => 'lib/Time/Clock.pm');
+              ABSTRACT_FROM => 'lib/Time/Clock.pm',
+              VERSION_FROM  => 'lib/Time/Clock.pm',
+              ($^O =~ /darwin/i ? (dist => { DIST_CP => 'cp' }) : ()), # Avoid Mac OS X ._* files
+              AUTHOR => 'John Siracusa <siracusa at gmail.com>',
+              ($MM_Version >= 6.48 ? (MIN_PERL_VERSION => '5.6.0') : ()),
+              ($MM_Version >= 6.31 ? (LICENSE => 'perl') : ()),
+              ($MM_Version <= 6.44 ? () : 
+              (META_MERGE => 
+              {
+                resources =>
+                {
+                  license     => 'http://dev.perl.org/licenses/',
+                  bugtracker  => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=Time-Clock',
+                  repository  => 'http://rose.googlecode.com/svn/trunk/modules/Time-Clock',
+                },
+              })));

Modified: trunk/libtime-clock-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/debian/changelog?rev=54658&op=diff
==============================================================================
--- trunk/libtime-clock-perl/debian/changelog (original)
+++ trunk/libtime-clock-perl/debian/changelog Tue Mar 23 03:33:31 2010
@@ -1,4 +1,4 @@
-libtime-clock-perl (0.12-2) UNRELEASED; urgency=low
+libtime-clock-perl (1.00-1) unstable; urgency=low
 
   [ gregor herrmann ]
   * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
@@ -7,7 +7,18 @@
   [ Nathan Handler ]
   * debian/watch: Update to ignore development releases.
 
- -- gregor herrmann <gregoa at debian.org>  Sun, 16 Nov 2008 20:48:30 +0100
+  [ Ansgar Burchardt ]
+  * New upstream release.
+  * Use source format 3.0 (quilt).
+  * Refresh rules for debhelper 7.
+  * Convert debian/copyright to proposed machine-readable format
+    and update years of copyright.
+  * debian/control: Make build-dep on perl unversioned.
+  * debian/control: Remove trailing ", " from Depends: field.
+  * Add myself to Uploaders.
+  * Bump Standard-Version to 3.8.4.
+
+ -- Ansgar Burchardt <ansgar at 43-1.org>  Tue, 23 Mar 2010 12:32:55 +0900
 
 libtime-clock-perl (0.12-1) unstable; urgency=low
 

Modified: trunk/libtime-clock-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/debian/compat?rev=54658&op=diff
==============================================================================
--- trunk/libtime-clock-perl/debian/compat (original)
+++ trunk/libtime-clock-perl/debian/compat Tue Mar 23 03:33:31 2010
@@ -1,1 +1,1 @@
-5
+7

Modified: trunk/libtime-clock-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/debian/control?rev=54658&op=diff
==============================================================================
--- trunk/libtime-clock-perl/debian/control (original)
+++ trunk/libtime-clock-perl/debian/control Tue Mar 23 03:33:31 2010
@@ -1,20 +1,20 @@
 Source: libtime-clock-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 5.0.0)
-Build-Depends-Indep: perl (>= 5.8.8-7)
-Uploaders: Krzysztof Krzyżaniak (eloy) <eloy at debian.org>
-Standards-Version: 3.7.3
+Build-Depends: debhelper (>= 7)
+Build-Depends-Indep: perl
+Uploaders: Krzysztof Krzyżaniak (eloy) <eloy at debian.org>,
+ Ansgar Burchardt <ansgar at 43-1.org>
+Standards-Version: 3.8.4
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Homepage: http://search.cpan.org/dist/Time-Clock/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libtime-clock-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libtime-clock-perl/
 
-
 Package: libtime-clock-perl
 Architecture: all
-Depends: ${perl:Depends}, ${misc:Depends}, 
-Description:  Twenty-four hour clock object with nanosecond precision.
+Depends: ${perl:Depends}, ${misc:Depends}
+Description: twenty-four hour clock object with nanosecond precision
  A Time::Clock object is a twenty-four hour clock with nanosecond precision 
  and wrap-around.  It is a clock only; it has absolutely no concept of dates.  
  Vagaries of date/time such as leap seconds and daylight savings time 

Modified: trunk/libtime-clock-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/debian/copyright?rev=54658&op=diff
==============================================================================
--- trunk/libtime-clock-perl/debian/copyright (original)
+++ trunk/libtime-clock-perl/debian/copyright Tue Mar 23 03:33:31 2010
@@ -1,26 +1,27 @@
-This is the debian package for the Time-Clock module.
-It was created by Krzysztof Krzyzaniak (eloy) <eloy at debian.org> using dh-make-perl.
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Maintainer: John C. Siracusa
+Source: http://search.cpan.org/dist/Time-Clock/
+Name: Time-Clock
 
-It was downloaded from http://search.cpan.org/dist/Time-Clock/
+Copyright: © 2010, John C. Siracusa
+License: Artistic or GPL-1+
 
-The upstream author is: 
+Files: debian/*
+Copyright:
+ © 2007-2008, Krzysztof Krzyżaniak (eloy) <eloy at debian.org>
+ © 2010,      Ansgar Burchardt <ansgar at 43-1.org>
+License: Artistic or GPL-1+
 
-John C. Siracusa (siracusa at mindspring.com).
+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'
 
-
-Copyright (c) 2006,2007 by John C. Siracusa.  All rights reserved.  
-
-This program is free software, you can redistribute it and/or modify it under
-the same terms as Perl itself.
-
-Perl is distributed under licenses:
-
-    a) the GNU General Public License as published by the Free Software
-       Foundation; either version 1, or (at your option) any later
-       version, or
-  
-    b) the "Artistic License" which comes with Perl.
-  
+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' and
-    the Artistic Licence in /usr/share/common-licenses/Artistic'.
+    Public License can be found in `/usr/share/common-licenses/GPL'

Modified: trunk/libtime-clock-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/debian/rules?rev=54658&op=diff
==============================================================================
--- trunk/libtime-clock-perl/debian/rules (original)
+++ trunk/libtime-clock-perl/debian/rules Tue Mar 23 03:33:31 2010
@@ -1,61 +1,3 @@
 #!/usr/bin/make -f
-# This debian/rules file is provided as a template for normal perl
-# packages. It was created by Marc Brockschmidt <marc at dch-faq.de> for
-# the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may
-# be used freely wherever it is useful.
-
-export PERL_MM_USE_DEFAULT=1
-PACKAGE=$(shell dh_listpackages)
-
-ifndef PERL
-PERL = /usr/bin/perl
-endif
-
-TMP     =$(CURDIR)/debian/$(PACKAGE)
-
-build: build-stamp
-build-stamp:
-	dh_testdir
-	$(PERL) Makefile.PL INSTALLDIRS=vendor
-	$(MAKE) OPTIMIZE="-Wall -O2 -g"
-	touch build-stamp
-
-clean:
-	dh_testdir
-	dh_testroot
-	[ ! -f Makefile ] || $(MAKE) realclean
-	dh_clean build-stamp install-stamp
-
-install: build install-stamp
-install-stamp:
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-	$(MAKE) test
-	$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
-	[ ! -d $(TMP)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5
-	touch install-stamp
-
-binary-arch:
-# We have nothing to do by default.
-
-binary-indep: build install
-	dh_testdir
-	dh_testroot
-	dh_installdocs 
-	dh_installchangelogs Changes
-	dh_perl
-	dh_link
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-source diff:
-	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary
+%:
+	dh $@

Added: trunk/libtime-clock-perl/debian/source/format
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/debian/source/format?rev=54658&op=file
==============================================================================
--- trunk/libtime-clock-perl/debian/source/format (added)
+++ trunk/libtime-clock-perl/debian/source/format Tue Mar 23 03:33:31 2010
@@ -1,0 +1,1 @@
+3.0 (quilt)

Modified: trunk/libtime-clock-perl/lib/Time/Clock.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/lib/Time/Clock.pm?rev=54658&op=diff
==============================================================================
--- trunk/libtime-clock-perl/lib/Time/Clock.pm (original)
+++ trunk/libtime-clock-perl/lib/Time/Clock.pm Tue Mar 23 03:33:31 2010
@@ -4,7 +4,7 @@
 
 use Carp;
 
-our $VERSION = '0.12';
+our $VERSION = '1.00';
 
 use overload
 (
@@ -12,8 +12,14 @@
    fallback => 1,
 );
 
-eval { require Time::HiRes };
-our $Have_HiRes_Time = $@ ? 0 : 1;
+our $Have_HiRes_Time;
+
+TRY:
+{
+  local $@;
+  eval { require Time::HiRes };
+  $Have_HiRes_Time = $@ ? 0 : 1;
+}
 
 # Allow an hour value of 24
 our $Allow_Hour_24 = 0;
@@ -192,8 +198,10 @@
   $format ||= ref($self)->default_format;
 
   my $hour  = $self->hour;
-  my $ihour = $hour > 12 ? ($hour - 12) : $hour;
+  my $ihour = $hour > 12 ? ($hour - 12) : $hour == 0 ? 12 : $hour;
   my $ns     = $self->nanosecond;
+
+  $ihour =~ s/^0//;
 
   my %formats =
   (
@@ -754,8 +762,8 @@
 
 John C. Siracusa (siracusa at gmail.com)
 
-=head1 COPYRIGHT
-
-Copyright (c) 2006 by John C. Siracusa.  All rights reserved.  This program is
+=head1 LICENSE
+
+Copyright (c) 2010 by John C. Siracusa.  All rights reserved.  This program is
 free software; you can redistribute it and/or modify it under the same terms
 as Perl itself.

Modified: trunk/libtime-clock-perl/t/format.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtime-clock-perl/t/format.t?rev=54658&op=diff
==============================================================================
--- trunk/libtime-clock-perl/t/format.t (original)
+++ trunk/libtime-clock-perl/t/format.t Tue Mar 23 03:33:31 2010
@@ -2,7 +2,7 @@
 
 use strict;
 
-use Test::More tests => 26;
+use Test::More tests => 28;
 
 use Time::Clock;
 
@@ -50,3 +50,11 @@
 
 $t->format('%H%%%M%%%2N');
 is($t->format('%H%%%M%%%2N'), '12%34%12', 'format %H%%%M%%%2N');
+
+$t->parse('12 AM');
+
+is($t->format('%i'), '12', 'format %i 12 AM');
+
+$t->parse('01:00:00');
+
+is($t->format('%i'), '1', 'format %i 01:00:00');




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