X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=current%2Flib%2FHTML%2FCalendarMonth%2FDateTool%2FCal.pm;h=e416528bc178b51daf9f943e1c783263252b71a4;hb=982e2bb08f00d800e2cd9fb65b108231719c8a65;hp=6542a42017a0b218982498275a8a1ea25436e287;hpb=7444dbb3f0999e61ca02028e688a97577040eafb;p=deb_pkgs%2Flibhtml-calendarmonth-perl.git diff --git a/current/lib/HTML/CalendarMonth/DateTool/Cal.pm b/current/lib/HTML/CalendarMonth/DateTool/Cal.pm index 6542a42..e416528 100644 --- a/current/lib/HTML/CalendarMonth/DateTool/Cal.pm +++ b/current/lib/HTML/CalendarMonth/DateTool/Cal.pm @@ -1,23 +1,21 @@ package HTML::CalendarMonth::DateTool::Cal; +{ + $HTML::CalendarMonth::DateTool::Cal::VERSION = '1.26'; +} # Interface to unix 'cal' command use strict; +use warnings; use Carp; -use vars qw(@ISA $VERSION); - -@ISA = qw(HTML::CalendarMonth::DateTool); - -$VERSION = '0.01'; - -use Time::Local; +use base qw( HTML::CalendarMonth::DateTool ); sub dow1st_and_lastday { my($self, $month, $year) = @_; $month ||= $self->month; $year ||= $self->year; - my $cmd = $self->cal_cmd or croak "cal command not found\n"; + my $cmd = $self->_cal_cmd or croak "cal command not found\n"; my @cal = grep(!/^\s*$/,`$cmd $month $year`); chomp @cal; @@ -27,11 +25,11 @@ sub dow1st_and_lastday { # With dow1st and lastday, one builds a calendar sequentially. # Historically, in particular Sep 1752, days have been skipped. Here's # the chance to catch that. - $self->skips(undef); + $self->_skips(undef); if ($month == 9 && $year == 1752) { my %skips; grep(++$skips{$_}, 3 .. 13); - $self->skips(\%skips); + $self->_skips(\%skips); } ($dow1st, $lastday); }