diff options
| author | fukachan <fukachan> | 2006-10-11 14:54:49 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2006-10-11 14:54:49 +0000 |
| commit | 57293ec56104c2fd7b3225fbe2eb903f1e053f42 (patch) | |
| tree | 02cad60bd3ad179f9da50e4abafa25c422b26bfb | |
| parent | d252a5abc0b6bf26b614908f9a260eab2c24ef3f (diff) | |
| download | fml8-57293ec56104c2fd7b3225fbe2eb903f1e053f42.tar.gz fml8-57293ec56104c2fd7b3225fbe2eb903f1e053f42.tar.bz2 fml8-57293ec56104c2fd7b3225fbe2eb903f1e053f42.zip | |
fix comments
| -rw-r--r-- | fml/lib/FML/Article/Sequence.pm | 5 | ||||
| -rw-r--r-- | fml/lib/FML/Cache/Journal.pm | 12 | ||||
| -rw-r--r-- | fml/lib/FML/Cache/Ring.pm | 30 | ||||
| -rw-r--r-- | fml/lib/FML/File/Rotate.pm | 12 | ||||
| -rw-r--r-- | fml/lib/FML/Log/Print/Simple.pm | 20 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Alias.pm | 4 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Calendar.pm | 6 | ||||
| -rw-r--r-- | fml/lib/FML/Process/QueueManager.pm | 5 |
8 files changed, 60 insertions, 34 deletions
diff --git a/fml/lib/FML/Article/Sequence.pm b/fml/lib/FML/Article/Sequence.pm index 17b60674..59bc7a6c 100644 --- a/fml/lib/FML/Article/Sequence.pm +++ b/fml/lib/FML/Article/Sequence.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: Sequence.pm,v 1.16 2005/06/04 08:49:06 fukachan Exp $ +# $FML: Sequence.pm,v 1.17 2005/06/04 08:51:31 fukachan Exp $ # package FML::Article::Sequence; @@ -34,7 +34,7 @@ save it to C<$sequence_file>. =cut -# Descriptions: determine article id (sequence number). +# Descriptions: determine the next article id (sequence number). # Arguments: OBJ($self) # Side Effects: save and update the current article sequence number. # Return Value: NUM(sequence identifier) or 0(failed) @@ -49,6 +49,7 @@ sub increment_id $curproc->lock($lock_channel); + # XXX-TODO: we should enhance sequence_file to all IO::Adapter classes. use IO::Adapter; my $io = new IO::Adapter "file:$seq_file"; my $id = $io->sequence_increment(); diff --git a/fml/lib/FML/Cache/Journal.pm b/fml/lib/FML/Cache/Journal.pm index 2ba0633e..c192c168 100644 --- a/fml/lib/FML/Cache/Journal.pm +++ b/fml/lib/FML/Cache/Journal.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2003,2004 Ken'ichi Fukamachi +# Copyright (C) 2003,2004,2006 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: Journal.pm,v 1.5 2004/06/26 11:24:44 fukachan Exp $ +# $FML: Journal.pm,v 1.6 2004/06/27 08:20:22 fukachan Exp $ # package FML::Cache::Journal; @@ -24,10 +24,16 @@ FML::Cache::Journal - interface into Tie::JournaledDir. =head2 new($curproc) +constructor. + =head2 open($cache_dir, $class) +open database via Tie::JournaledDir. + =head2 close() +close connection to database. + =cut @@ -96,7 +102,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2003,2004 Ken'ichi Fukamachi +Copyright (C) 2003,2004,2006 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. diff --git a/fml/lib/FML/Cache/Ring.pm b/fml/lib/FML/Cache/Ring.pm index 3ea6e485..0764373d 100644 --- a/fml/lib/FML/Cache/Ring.pm +++ b/fml/lib/FML/Cache/Ring.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2004,2005 Ken'ichi Fukamachi +# Copyright (C) 2004,2005,2006 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: Ring.pm,v 1.5 2005/05/27 03:03:33 fukachan Exp $ +# $FML: Ring.pm,v 1.6 2005/08/17 10:51:01 fukachan Exp $ # package FML::Cache::Ring; @@ -35,7 +35,7 @@ FML::Cache::Ring - IO operations to ring buffer which consists of files. ... unlock ... -The buffer directory has files with the name C<0>, C<1>, ... +The buffer directory has files with the numeric name C<0>, C<1>, ... You can specify C<file_name> parameter. $obj = new FML::Cache::Ring { @@ -43,12 +43,14 @@ You can specify C<file_name> parameter. file_name => '_smtplog', }; -If so, the file names become _smtplog.0, _smtplog.1, ... +If specified, the file names become _smtplog.0, _smtplog.1, ... The cache data is limited by the number of files, so approximately -size by default. Instead of number fo files, you can limit -FML::Cache::Ring based on time. It is time based expiretion. If you -so, use new() like this: +size by default. + +Instead of number fo files, you can limit FML::Cache::Ring based on +time. It is time based expiretion. To specify based expiration, use +new() like this: $obj = new FML::Cache::Ring { directory => '/some/where', @@ -110,7 +112,7 @@ END {} # Descriptions: constructor. -# forward new() request to superclass (IO::File) +# forward new() request to superclass (IO::File). # Arguments: OBJ($self) HASH_REF($args) # Side Effects: none # Return Value: OBJ (blessed as a file handle). @@ -159,7 +161,7 @@ sub _take_file_name my $io = new IO::Adapter $seq_file; my $id = $io->sequence_increment(); - # updated. + # the sequence $id is already incremetd. my $saved_id = $id; # check if $id is rolled over or not. @@ -195,7 +197,7 @@ sub cache_file_path =head2 open(file, mode) open file in the buffer. -The target file is already determined when constructor runs. +The target file is already determined when our constructor runs. =cut @@ -203,7 +205,7 @@ The target file is already determined when constructor runs. # Descriptions: open() cache file in the buffer. # Arguments: OBJ($self) STR($file) STR($mode) # XXX $self is blessed file handle. -# Side Effects: create ${ *$self } hash to save status information +# Side Effects: create ${ *$self } hash to save status information. # Return Value: HANDLE(write file handle for $file.new.$$) sub open { @@ -299,12 +301,12 @@ sub add =head2 get(key) -get value (latest value in the ring buffer) for key. +get value (latest value in the ring buffer) for the key. =cut -# Descriptions: get value (latest value in the ring buffer) for key. +# Descriptions: get value (latest value in the ring buffer) for the key. # Arguments: OBJ($self) STR($key) # Side Effects: none # Return Value: STR @@ -481,7 +483,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2004,2005 Ken'ichi Fukamachi +Copyright (C) 2004,2005,2006 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. diff --git a/fml/lib/FML/File/Rotate.pm b/fml/lib/FML/File/Rotate.pm index 06fbb6c6..670e6746 100644 --- a/fml/lib/FML/File/Rotate.pm +++ b/fml/lib/FML/File/Rotate.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: Rotate.pm,v 1.7 2006/04/22 08:29:23 fukachan Exp $ +# $FML: Rotate.pm,v 1.8 2006/07/09 12:11:12 fukachan Exp $ # package FML::File::Rotate; @@ -28,8 +28,8 @@ FML::File::Rotate - file rotatation utilities. =head1 DESCRIPTION -Utility functions for file rotatation. -It turns over the given C<file> by some condition. +This module provides utility functions for file rotatation. +It turns over the given files under some condition. Typical condition is given as the number of files, size or how old they are. C<rotation> renames and rearranges files like this: @@ -110,7 +110,7 @@ sub set_size_limit } -# Descriptions: get max_size. +# Descriptions: get max_size. 300K bytes by default. # Arguments: OBJ($self) # Side Effects: none # Return Value: NUM @@ -122,7 +122,7 @@ sub get_size_limit } -# Descriptions: set number of backlog files. +# Descriptions: set the number of backlog files. # Arguments: OBJ($self) NUM($num) # Side Effects: update $self # Return Value: none @@ -140,7 +140,7 @@ sub set_archive_file_total } -# Descriptions: get number of backlog files. +# Descriptions: get the number of backlog files. # Arguments: OBJ($self) # Side Effects: none # Return Value: NUM diff --git a/fml/lib/FML/Log/Print/Simple.pm b/fml/lib/FML/Log/Print/Simple.pm index 68b06bac..b1f380ee 100644 --- a/fml/lib/FML/Log/Print/Simple.pm +++ b/fml/lib/FML/Log/Print/Simple.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: Simple.pm,v 1.4 2004/01/23 09:17:38 fukachan Exp $ +# $FML: Simple.pm,v 1.5 2004/07/23 13:16:39 fukachan Exp $ # package FML::Log::Print::Simple; @@ -22,7 +22,9 @@ FML::Log::Print::Simple - simplest print out engine. =head1 METHODS -=head2 C<new()> +=head2 new() + +constructor. =cut @@ -44,6 +46,13 @@ sub new } +=head2 add($msg) + +add message to module internal message queue. + +=cut + + # Descriptions: add message to module internal message queue. # Arguments: OBJ($self) OBJ($msg) # Side Effects: update queue. @@ -56,6 +65,13 @@ sub add } +=head2 print() + +print message in the internal queue. + +=cut + + # Descriptions: print out to STDOUT. # Arguments: OBJ($self) # Side Effects: none diff --git a/fml/lib/FML/Process/Alias.pm b/fml/lib/FML/Process/Alias.pm index 8e824d03..1b7c9e63 100644 --- a/fml/lib/FML/Process/Alias.pm +++ b/fml/lib/FML/Process/Alias.pm @@ -3,7 +3,7 @@ # Copyright (C) 2001,2002,2003,2004,2005 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Alias.pm,v 1.22 2005/06/04 08:51:30 fukachan Exp $ +# $FML: Alias.pm,v 1.23 2005/08/10 15:03:24 fukachan Exp $ # package FML::Process::Alias; @@ -45,7 +45,7 @@ It make a C<FML::Process::Kernel> object and return it. =head2 prepare($args) -load config files and fix @INC. +load configuration files and fix @INC. =head2 verify_request($args) diff --git a/fml/lib/FML/Process/Calendar.pm b/fml/lib/FML/Process/Calendar.pm index 05c72772..f6714664 100644 --- a/fml/lib/FML/Process/Calendar.pm +++ b/fml/lib/FML/Process/Calendar.pm @@ -3,7 +3,7 @@ # Copyright (C) 2002,2003,2004,2005 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Calendar.pm,v 1.17 2005/06/04 08:49:08 fukachan Exp $ +# $FML: Calendar.pm,v 1.18 2005/08/10 15:03:24 fukachan Exp $ # package FML::Process::Calendar; @@ -17,7 +17,7 @@ use FML::Process::Kernel; =head1 NAME -FML::Process::Calendar -- demonstration of FML module usage. +FML::Process::Calendar -- show calendear (as a demonstration). =head1 SYNOPSIS @@ -85,7 +85,7 @@ sub prepare { my ($curproc, $args) = @_; - # load default configurations. + # load only "default" configurations. use FML::Config; $curproc->{ config } = new FML::Config; $curproc->config_cf_files_load(); diff --git a/fml/lib/FML/Process/QueueManager.pm b/fml/lib/FML/Process/QueueManager.pm index ed56726a..e2192e62 100644 --- a/fml/lib/FML/Process/QueueManager.pm +++ b/fml/lib/FML/Process/QueueManager.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: QueueManager.pm,v 1.42 2006/04/20 23:56:02 fukachan Exp $ +# $FML: QueueManager.pm,v 1.43 2006/04/22 08:55:32 fukachan Exp $ # package FML::Process::QueueManager; @@ -94,7 +94,8 @@ sub send $queue->set_log_error_function($fp_logerror); $queue->set_log_debug_function($fp_logdebug); - my $ra = []; + # XXX-TODO: more readable variable name: $ra -> $msg_queue_list ? + my $ra = []; if (defined $id) { $ra = [ $id ]; } |
