From: Don Armstrong Date: Thu, 19 Jun 2008 19:13:28 +0000 (+0000) Subject: update libhtml-calendarmonth-perl to 1.19 X-Git-Tag: debian/1.19-2~4 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Flibhtml-calendarmonth-perl.git;a=commitdiff_plain;h=9a2930defe8c992ecc154a1056314997f4b19fae update libhtml-calendarmonth-perl to 1.19 --- diff --git a/Changes b/Changes index 7f67f72..9c7f964 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,16 @@ Revision history for Perl extension HTML-CalendarMonth. +1.19 Sat Mar 15 00:47:26 EDT 2008 + - Fixed longstanding test failure due to HTML::Tree (properly) + deciding to put quotes around numeric attributes in tags. + - Also changed i8n test to Zulu rather than Basque since the + DateTime::Local::eu (Basque) module no longer has + abbreviated day names + - Some of the DateTool modules had a minor bug in add_days() not + checking for defined vs 0 + - I released a calendar-related module update on the Ides of + March. I'm just sayin'. + 1.18 Fri Feb 24 15:53:41 EST 2006 - Fixed some scoping issues in DateTool/DateCalc.pm (thanks Carl Franks) diff --git a/META.yml b/META.yml index 2048e06..fcb9c14 100644 --- a/META.yml +++ b/META.yml @@ -1,15 +1,17 @@ -# http://module-build.sourceforge.net/META-spec.html -#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# -name: HTML-CalendarMonth -version: 1.18 -version_from: lib/HTML/CalendarMonth.pm -installdirs: site -requires: +--- #YAML:1.0 +name: HTML-CalendarMonth +version: 1.19 +abstract: ~ +license: ~ +author: ~ +generated_by: ExtUtils::MakeMaker version 6.42 +distribution_type: module +requires: Class::Accessor: 0 DateTime::Locale: 0 File::Spec: 0 HTML::ElementTable: 1.15 Time::Local: 0 - -distribution_type: module -generated_by: ExtUtils::MakeMaker version 6.30 +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.3.html + version: 1.3 diff --git a/README b/README index 42df8e0..efd6c40 100644 --- a/README +++ b/README @@ -62,11 +62,11 @@ ACKNOWLEDGMENTS Thanks to William R. Ward for some conceptual nudging. Thanks to Fabian Aichele, Jarkko Hietaniemi, Wolfgang Jürgensen, and David 'Sniper' Rigaudiere for some suggestions on global calendar customs. Thanks to -Gael Marziou, Raul Rivero, T. Bugra Uytun, and Philipp W. for some -helpful bug spotting. +Gael Marziou, Raul Rivero, Ricardo Signes, T. Bugra Uytun, and Philipp +W. for some helpful bug spotting. COPYRIGHT -Copyright (c) 1999-2005 Matthew P. Sisk. All rights reserved. All wrongs +Copyright (c) 1999-2008 Matthew P. Sisk. All rights reserved. All wrongs revenged. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/debian/changelog b/debian/changelog index 7dcca9e..e12941f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libhtml-calendarmonth-perl (1.19-1) UNRELEASED; urgency=low + + * (NOT RELEASED YET) New upstream release + + -- Don Armstrong Thu, 19 Jun 2008 12:10:31 -0700 + libhtml-calendarmonth-perl (1.18-4) unstable; urgency=low * Handle a non-existent /usr/lib/perl5 properly (for perl 5.10) diff --git a/lib/HTML/CalendarMonth.pm b/lib/HTML/CalendarMonth.pm index 5e3dc4e..7ae7ae8 100644 --- a/lib/HTML/CalendarMonth.pm +++ b/lib/HTML/CalendarMonth.pm @@ -3,7 +3,7 @@ package HTML::CalendarMonth; use strict; use vars qw($VERSION @ISA); -$VERSION = '1.18'; +$VERSION = '1.19'; use Carp; @@ -1292,7 +1292,7 @@ Matthew P. Sisk, EFE =head1 COPYRIGHT -Copyright (c) 1998-2005 Matthew P. Sisk. All rights reserved. All wrongs +Copyright (c) 1998-2008 Matthew P. Sisk. All rights reserved. All wrongs revenged. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/lib/HTML/CalendarMonth/DateTool/DateCalc.pm b/lib/HTML/CalendarMonth/DateTool/DateCalc.pm index 17c3ed5..90612f6 100644 --- a/lib/HTML/CalendarMonth/DateTool/DateCalc.pm +++ b/lib/HTML/CalendarMonth/DateTool/DateCalc.pm @@ -9,7 +9,7 @@ use vars qw(@ISA $VERSION); @ISA = qw(HTML::CalendarMonth::DateTool); -$VERSION = '0.02'; +$VERSION = '0.03'; use Date::Calc qw(Days_in_Month Day_of_Week Add_Delta_Days Weeks_in_Year Week_of_Year Week_Number Mktime @@ -45,7 +45,7 @@ sub dow { sub add_days { my($self, $delta, $day, $month, $year) = @_; - $delta || croak "Delta (in days) required.\n"; + defined $delta || croak "Delta (in days) required.\n"; $day || croak "Day required.\n"; $month ||= $self->month; $year ||= $self->year; diff --git a/lib/HTML/CalendarMonth/DateTool/DateManip.pm b/lib/HTML/CalendarMonth/DateTool/DateManip.pm index 0dadef0..882aed6 100644 --- a/lib/HTML/CalendarMonth/DateTool/DateManip.pm +++ b/lib/HTML/CalendarMonth/DateTool/DateManip.pm @@ -9,7 +9,7 @@ use vars qw(@ISA $VERSION); @ISA = qw(HTML::CalendarMonth::DateTool); -$VERSION = '0.01'; +$VERSION = '0.02'; use Date::Manip qw(Date_DaysInMonth Date_DayOfWeek DateCalc UnixDate Date_SecsSince1970); @@ -47,7 +47,7 @@ sub dow { sub add_days { my($self, $delta, $day, $month, $year) = @_; - $delta || croak "Delta (in days) required.\n"; + defined $delta || croak "Delta (in days) required.\n"; $day || croak "Day required.\n"; $month ||= $self->month; $year ||= $self->year; diff --git a/lib/HTML/CalendarMonth/DateTool/DateTime.pm b/lib/HTML/CalendarMonth/DateTool/DateTime.pm index f6e366d..9e6e13c 100644 --- a/lib/HTML/CalendarMonth/DateTool/DateTime.pm +++ b/lib/HTML/CalendarMonth/DateTool/DateTime.pm @@ -9,7 +9,7 @@ use vars qw(@ISA $VERSION); @ISA = qw(HTML::CalendarMonth::DateTool); -$VERSION = '0.01'; +$VERSION = '0.02'; use DateTime; @@ -42,7 +42,7 @@ sub dow { sub add_days { my($self, $delta, $day, $month, $year) = @_; - $delta || croak "Delta (in days) required.\n"; + defined $delta || croak "Delta (in days) required.\n"; $day || croak "Day required.\n"; $month ||= $self->month; $year ||= $self->year; diff --git a/t/20_i8n.t b/t/20_i8n.t index 1866d02..d019792 100755 --- a/t/20_i8n.t +++ b/t/20_i8n.t @@ -1,30 +1,33 @@ #!/usr/bin/perl use strict; +use FindBin; +use lib $FindBin::RealBin; -use Test::More tests => 1; +use testload; + +use Test::More tests => 2; use HTML::CalendarMonth; use HTML::CalendarMonth::Locale; -my $basque; +my $zulu; eval do { local $/; }; die "Oops on eval: $@\n" if $@; +$zulu = dq_nums($zulu); -# i8n (use basque as example) +# i8n (use zulu as example) my @stoof = HTML::CalendarMonth::Locale->locales; ok(@stoof > 20, 'i8n: locale ids retreived'); -# my($year, $month) = (2000, 12); -# my $b = HTML::CalendarMonth->new( -# year => $year, -# month => $month, -# head_week => 1, -# locale => 'eu', -# ); -# my $bstr = $b->as_HTML; -# chomp($bstr); -# $bstr =~ s/\=\"(\d+)\"/=$1/g; -# cmp_ok($bstr, 'eq', $basque, "i8n: ($year/$month : Basque) using auto-detect"); -# -# __DATA__ -# $basque = '
abendua2000
igalasazogorlr 
          1248
345678949
1011121314151650
1718192021222351
2425262728293052
31            1
'; +my($year, $month) = (2008, 3); +my $b = HTML::CalendarMonth->new( + year => $year, + month => $month, + locale => 'zu', +); +my $bstr = dq_nums($b->as_HTML); +chomp($bstr); +cmp_ok($bstr, 'eq', $zulu, "i8n: ($year/$month : Zulu) using auto-detect"); + +__DATA__ +$zulu = '
Mashi2008
SonMsoBilThaSinHlaMgq
            1
2345678
9101112131415
16171819202122
23242526272829
3031         
' diff --git a/t/testload.pm b/t/testload.pm index 63a2bb4..e1f8efc 100644 --- a/t/testload.pm +++ b/t/testload.pm @@ -12,6 +12,7 @@ require Exporter; @EXPORT = qw( $Dat_Dir check_datetool case_count check_basic_with_datetool check_woy_with_datetool + dq_nums ); use File::Spec; @@ -27,7 +28,7 @@ BEGIN { $pkg = File::Spec->canonpath($INC{$pkg}); my $file; ($vol, $dir, $file) = File::Spec->splitpath($pkg); - $base_dir = File::Spec->catpath($vol, $dir); + $base_dir = File::Spec->catpath($vol, $dir, ''); } $Dat_Dir = $base_dir; @@ -68,6 +69,17 @@ while () { close(D); +############# + +# guard against HTML::Tree starting to quote numeric attrs as of +# v3.19_02 + +sub dq_nums { + my $str = shift; + $str =~ s/\"(\d+)\"/$1/g; + return $str; +} + sub case_count { scalar @Cals } sub check_datetool { @@ -92,7 +104,7 @@ sub check_basic_with_datetool { my $gen_html = $c->as_HTML; $gen_html =~ s/\=\"(\d+)\"/=$1/g; my $day1 = $days[$cal->[3] - 1]; - cmp_ok($gen_html, 'eq', $cal->[2], + cmp_ok(dq_nums($c->as_HTML), 'eq', $cal->[2], sprintf("(%d/%-02d %s 1st day) using %s", $cal->[0], $cal->[1], $day1, $method)); if ($DEBUG && $c->as_HTML ne $cal->[2]) { @@ -112,7 +124,7 @@ sub check_woy_with_datetool { head_week => 1, datetool => $datetool, ); - my $ct = $cal->as_HTML; + my $ct = dq_nums($cal->as_HTML); chomp $ct; $ct =~ s/\=\"(\d+)\"/=$1/g; cmp_ok($ct, 'eq', $tc, "($year/$month week of year) using $datetool");