diff options
| author | fukachan <fukachan> | 2002-04-03 11:32:57 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-04-03 11:32:57 +0000 |
| commit | c6078a19cf75b629679bf0e511d2804fb3e1b8d5 (patch) | |
| tree | a888f5d4bdac79dabd3563b06f05c5963ccc247b /fml/lib/FML/Article.pm | |
| parent | 06df1cc364822a8176ea12b4881cd9fbb1d9a881 (diff) | |
| download | fml8-c6078a19cf75b629679bf0e511d2804fb3e1b8d5.tar.gz fml8-c6078a19cf75b629679bf0e511d2804fb3e1b8d5.tar.bz2 fml8-c6078a19cf75b629679bf0e511d2804fb3e1b8d5.zip | |
clean up doc & codes, FNF-ify
Diffstat (limited to 'fml/lib/FML/Article.pm')
| -rw-r--r-- | fml/lib/FML/Article.pm | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/fml/lib/FML/Article.pm b/fml/lib/FML/Article.pm index 450b2405..6c90604a 100644 --- a/fml/lib/FML/Article.pm +++ b/fml/lib/FML/Article.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: Article.pm,v 1.32 2002/03/30 15:29:42 fukachan Exp $ +# $FML: Article.pm,v 1.33 2002/03/31 02:25:42 fukachan Exp $ # package FML::Article; @@ -61,8 +61,8 @@ sub new } -# Descriptions: prepare article template to distribute -# Arguments: OBJ($self) OBJ($curproc) +# Descriptions: build an article template to distribute +# Arguments: OBJ($curproc) # Side Effects: build $curproc->{ article } # Return Value: none sub _setup_article_template @@ -104,6 +104,8 @@ sub increment_id my $pcb = $curproc->{ pcb }; my $seq_file = $config->{ sequence_file }; + # XXX we should enhance IO::Adapter module to handle + # XXX sequential number. use File::Sequence; my $sfh = new File::Sequence { sequence_file => $seq_file }; my $id = $sfh->increment_id; @@ -149,18 +151,20 @@ If the variable C<$use_spool> is 'yes', this routine works. sub spool_in { my ($self, $id) = @_; - - # configurations my $curproc = $self->{ curproc }; my $config = $curproc->{ config }; my $spool_dir = $config->{ spool_dir }; if ( $config->yes( 'use_spool' ) ) { unless (-d $spool_dir) { - use File::Path; - mkpath( $spool_dir, 0, 0700 ); + eval q{ + use File::Path; + mkpath( $spool_dir, 0, 0700 ); + }; + LogError($@) if $@; } + # translate the article path e.g. spool/1900, spool/2/1900 my $file = $self->filepath($id); use FileHandle; @@ -205,8 +209,6 @@ sub filepath id => $id, } ); - Log("debug: spooled path = $file"); - return $file; } |
