diff options
| author | fukachan <fukachan> | 2004-12-23 12:32:01 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2004-12-23 12:32:01 +0000 |
| commit | be22ec68dec1845daa9eb19f53d8602399ff6888 (patch) | |
| tree | c56c4d1d92b0a3157c2abe8f3c688232f4224617 | |
| parent | 397e68ede351f054092b63616d4dbabda36044a8 (diff) | |
| download | fml8-be22ec68dec1845daa9eb19f53d8602399ff6888.tar.gz fml8-be22ec68dec1845daa9eb19f53d8602399ff6888.tar.bz2 fml8-be22ec68dec1845daa9eb19f53d8602399ff6888.zip | |
move Calendar::Lite to FML::Demo::Calendar since this module needs
FML::* class.
| -rw-r--r-- | fml/lib/FML/CGI/Calendar.pm | 6 | ||||
| -rw-r--r-- | fml/lib/FML/Demo/Calendar.pm (renamed from fml/lib/Calendar/Lite.pm) | 49 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Calendar.pm | 10 |
3 files changed, 33 insertions, 32 deletions
diff --git a/fml/lib/FML/CGI/Calendar.pm b/fml/lib/FML/CGI/Calendar.pm index 4c4f23bf..3a4dea23 100644 --- a/fml/lib/FML/CGI/Calendar.pm +++ b/fml/lib/FML/CGI/Calendar.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Calendar.pm,v 1.8 2004/01/01 23:52:09 fukachan Exp $ +# $FML: Calendar.pm,v 1.9 2004/07/23 13:16:33 fukachan Exp $ # package FML::CGI::Calendar; @@ -136,8 +136,8 @@ sub run_cgi_main my ($curproc) = @_; my $user = $curproc->safe_param_user; - use Calendar::Lite; - my $schedule = new Calendar::Lite { user => $user }; + use FML::Demo::Calendar; + my $schedule = new FML::Demo::Calendar { user => $user }; for my $n ('this', 'next', 'last') { $schedule->print_specific_month(\*STDOUT, $n); diff --git a/fml/lib/Calendar/Lite.pm b/fml/lib/FML/Demo/Calendar.pm index 3fc41839..9f45f64e 100644 --- a/fml/lib/Calendar/Lite.pm +++ b/fml/lib/FML/Demo/Calendar.pm @@ -1,25 +1,25 @@ #-*- perl -*- # -# Copyright (C) 2001,2002,2003,2004 Ken'ichi Fukamachi +# Copyright (C) 2004 Ken'ichi Fukamachi # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Lite.pm,v 1.21 2004/04/02 12:14:31 fukachan Exp $ +# $FML: Lite.pm,v 1.22 2004/07/11 15:01:50 fukachan Exp $ # -package Calendar::Lite; +package FML::Demo::Calendar; use strict; use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD); use Carp; =head1 NAME -Calendar::Lite - show a calendar (demonstration module). +FML::Demo::Calendar - show a calendar (demonstration module). =head1 SYNOPSIS - use Calendar::Lite; - my $schedule = new Calendar::Lite; + use FML::Demo::Calendar; + my $schedule = new FML::Demo::Calendar; $schedule->parse; @@ -216,11 +216,11 @@ sub parse } -# Descriptions: initialize calender object. +# Descriptions: initialize Calendar object. # Arguments: OBJ($self) STR($year) STR($month) # Side Effects: none # Return Value: none -sub _init_calender +sub _init_Calendar { my ($self, $year, $month) = @_; @@ -228,10 +228,10 @@ sub _init_calender my $cal = new HTML::CalendarMonthSimple('year'=> $year, 'month'=> $month); if (defined $cal) { - $self->{ _calender } = $cal; + $self->{ _Calendar } = $cal; } else { - croak("cannot create calender object"); + croak("cannot create Calendar object"); } $cal->width('70%'); @@ -250,9 +250,9 @@ sub _analyze_file { my ($self, $year, $month, $file, $pattern) = @_; - # initialize year+month dependent calender object - # since _analyze() adds matched data into this calender object. - $self->_init_calender($year, $month); + # initialize year+month dependent Calendar object + # since _analyze() adds matched data into this Calendar object. + $self->_init_Calendar($year, $month); $self->_analyze($file, $pattern); } @@ -267,9 +267,9 @@ sub _analyze_dir { my ($self, $year, $month, $data_dir, $pattern) = @_; - # initialize year+month dependent calender object - # since _analyze() adds matched data into this calender object. - $self->_init_calender($year, $month); + # initialize year+month dependent Calendar object + # since _analyze() adds matched data into this Calendar object. + $self->_init_Calendar($year, $month); use DirHandle; my $dh = new DirHandle $data_dir; @@ -338,7 +338,7 @@ sub _analyze sub _add_entry { my ($self, $day, $buf) = @_; - my $cal = $self->{ _calender }; + my $cal = $self->{ _Calendar }; $day =~ s/^0//; if (defined $day && defined $buf) { @@ -365,9 +365,9 @@ sub print_as_html { my ($self, $fd) = @_; - if (defined $self->{ _calender }) { + if (defined $self->{ _Calendar }) { $fd = defined $fd ? $fd : \*STDOUT; - print $fd $self->{ _calender }->as_HTML; + print $fd $self->{ _Calendar }->as_HTML; } else { croak("undefined schedule object"); @@ -427,7 +427,7 @@ sub print_specific_month print $fh "</pre>\n"; } - # calender style + # Calendar style $self->print_as_html($fh); } @@ -439,7 +439,7 @@ sub print_specific_month sub _print_specific_day { my ($self, $fh, $time) = @_; - my $cal = $self->{ _calender }; + my $cal = $self->{ _Calendar }; my ($sec,$min,$hour,$mday,$month,$year,$wday) = localtime($time); my $buf = $cal->getcontent($mday) || ''; @@ -505,18 +505,19 @@ Ken'chi Fukamachi =head1 COPYRIGHT -Copyright (C) 2001,2002,2003,2004 Ken'chi Fukamachi +Copyright (C) 2004 Ken'chi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 HISTORY -Calendar::Lite first appeared in fml8 mailing list driver package. +FML::Demo::Calendar first appeared in fml8 mailing list driver package. See C<http://www.fml.org/> for more details. Firstly this module name is C<TinyScheduler.pm> and renamed to -Calendar::Lite later. +Calendar::Lite later. In 2004, it is renamed to FML::Demo::Calendar +again since this module must depend FML::* classes. =cut diff --git a/fml/lib/FML/Process/Calendar.pm b/fml/lib/FML/Process/Calendar.pm index 55605a33..081bf0c0 100644 --- a/fml/lib/FML/Process/Calendar.pm +++ b/fml/lib/FML/Process/Calendar.pm @@ -3,7 +3,7 @@ # Copyright (C) 2002,2003,2004 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Calendar.pm,v 1.13 2004/02/15 04:38:33 fukachan Exp $ +# $FML: Calendar.pm,v 1.14 2004/07/11 15:43:38 fukachan Exp $ # package FML::Process::Calendar; @@ -29,7 +29,7 @@ FML::Process::Calendar -- demonstration of FML module usage. FML::Process::Calendar is a demonstration module to show fml module usage. This module provides calendar presentation as a simple -scheduler based on Calendar::Lite class. +scheduler based on FML::Demo::Calendar class. =head1 METHODS @@ -106,7 +106,7 @@ sub verify_request { 1; } sub finish { 1; } -# Descriptions: prepare parameters and call Calendar::Lite module. +# Descriptions: prepare parameters and call FML::Demo::Calendar module. # we use w3m to show calendar (HTML table). # Arguments: OBJ($curproc) HASH_REF($args) # Side Effects: create temporary file and remove it in the last @@ -125,7 +125,7 @@ sub run } use FileHandle; - use Calendar::Lite; + use FML::Demo::Calendar; # prepare new() argument $mode = $option->{ m } if defined $option->{ m }; @@ -135,7 +135,7 @@ sub run schedule_dir => $schedule_dir, schedule_file => undef, }; - my $schedule = new Calendar::Lite $schargs; + my $schedule = new FML::Demo::Calendar $schargs; # prepare output channel my $tmpf = $schedule->tmpfilepath; |
