diff options
| author | fukachan <fukachan> | 2001-02-09 16:02:13 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-02-09 16:02:13 +0000 |
| commit | e1480069e211a287cd105a38954ca77a555af59d (patch) | |
| tree | af6f3596e4c19cc76dbfa2ac7f0640774ab227a7 /fml/lib/FML/Ticket | |
| parent | fa71ce1e6119263c3b5024e6c409b6ba57ef3423 (diff) | |
| download | fml8-e1480069e211a287cd105a38954ca77a555af59d.tar.gz fml8-e1480069e211a287cd105a38954ca77a555af59d.tar.bz2 fml8-e1480069e211a287cd105a38954ca77a555af59d.zip | |
print/printf $fd for further extension
Diffstat (limited to 'fml/lib/FML/Ticket')
| -rw-r--r-- | fml/lib/FML/Ticket/Model/toymodel.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fml/lib/FML/Ticket/Model/toymodel.pm b/fml/lib/FML/Ticket/Model/toymodel.pm index 472b2592..3866c3ac 100644 --- a/fml/lib/FML/Ticket/Model/toymodel.pm +++ b/fml/lib/FML/Ticket/Model/toymodel.pm @@ -328,6 +328,7 @@ sub list_up use FML::Date; my $dh = new FML::Date; my $now = time; # save the current UTC for convenience + my $fd = $self->{ _fd } || \*STDOUT; # XXX $rh = Reference to Hash table, which is tied to db_dir/*db's my $rh = $self->{ _hash_table }; @@ -339,9 +340,9 @@ sub list_up # format $| = 1; - printf($format, 'date', 'age', 'status', 'ticket id', 'articles'); - print "-" x60; - print "\n"; + printf($fd $format, 'date', 'age', 'status', 'ticket id', 'articles'); + print $fd "-" x60; + print $fd "\n"; my (@tid); @@ -364,7 +365,7 @@ sub list_up my $date = $dh->YYYYxMMxDD( $rh->{ _date }->{ $aid } , '/'); my $status = $rh->{ _status }->{ $tid }; - printf($format, $date, $age, $status, $tid, $rh->{ _articles }->{ $tid }); + printf($fd $format, $date, $age, $status, $tid, $rh->{ _articles }->{ $tid }); } # self->{ _hash_table } is untied from DB's. |
