diff options
| author | fukachan <fukachan> | 2003-01-29 11:34:33 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-01-29 11:34:33 +0000 |
| commit | 81892ba25ea58dc1f5fb2dbab87488513ac9cf78 (patch) | |
| tree | a8aaa51a7be40901fadb33abe1d9764097ca3983 /fml/lib/FML/Process | |
| parent | 432f41cfbf7d1c6dd6486667b6569ce69e97eae3 (diff) | |
| download | fml8-81892ba25ea58dc1f5fb2dbab87488513ac9cf78.tar.gz fml8-81892ba25ea58dc1f5fb2dbab87488513ac9cf78.tar.bz2 fml8-81892ba25ea58dc1f5fb2dbab87488513ac9cf78.zip | |
prepare() loads default configuration to use $path_* info.
w3m -> $path_w3m
cat -> $curproc->cat() method (XXX temporary use).
Diffstat (limited to 'fml/lib/FML/Process')
| -rw-r--r-- | fml/lib/FML/Process/Calender.pm | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/fml/lib/FML/Process/Calender.pm b/fml/lib/FML/Process/Calender.pm index e3e2a904..2903ccc0 100644 --- a/fml/lib/FML/Process/Calender.pm +++ b/fml/lib/FML/Process/Calender.pm @@ -3,7 +3,7 @@ # Copyright (C) 2002,2003 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Calender.pm,v 1.10 2002/12/18 04:43:51 fukachan Exp $ +# $FML: Calender.pm,v 1.11 2003/01/11 16:05:17 fukachan Exp $ # package FML::Process::Calender; @@ -62,11 +62,19 @@ sub new } -# Descriptions: dummy +# Descriptions: load default configurations to use $path_* info. # Arguments: OBJ($curproc) HASH_REF($args) # Side Effects: none # Return Value: none -sub prepare { 1;} +sub prepare +{ + my ($curproc, $args) = @_; + + # load default configurations. + use FML::Config; + $curproc->{ config } = new FML::Config; + $curproc->load_config_files( $args->{ cf_list } ); +} # Descriptions: dummy @@ -91,6 +99,7 @@ sub finish { 1; } sub run { my ($curproc, $args) = @_; + my $config = $curproc->config(); my $argv = $args->{ argv }; my $option = $args->{ options }; my $mode = 'text'; @@ -141,11 +150,12 @@ sub run # XXX-TODO: use $path_w3m not w3m if ($mode eq 'text') { - system "w3m -dump $tmpf"; + my $w3m = $config->{ path_w3m } || 'w3m'; + system "$w3m -dump $tmpf"; } # XXX-TODO: use $path_cat not cat else { - system "cat $tmpf"; + $curproc->cat( [ $tmpf ] ); } unlink $tmpf if -f $tmpf; |
