summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command/HTMLify.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-01-21 03:49:55 +0000
committerfukachan <fukachan>2004-01-21 03:49:55 +0000
commitbd8778ca1bb0f7d3e253e8192b5a3836d578fcbb (patch)
tree9100749e628e804eb3cb626144bdf6bc3d79a1f8 /fml/lib/FML/Command/HTMLify.pm
parent55ce57769c4cb0396509399cf7b0f606bf996b1c (diff)
downloadfml8-bd8778ca1bb0f7d3e253e8192b5a3836d578fcbb.tar.gz
fml8-bd8778ca1bb0f7d3e253e8192b5a3836d578fcbb.tar.bz2
fml8-bd8778ca1bb0f7d3e253e8192b5a3836d578fcbb.zip
fix comments.
add missing loop label.
Diffstat (limited to 'fml/lib/FML/Command/HTMLify.pm')
-rw-r--r--fml/lib/FML/Command/HTMLify.pm34
1 files changed, 19 insertions, 15 deletions
diff --git a/fml/lib/FML/Command/HTMLify.pm b/fml/lib/FML/Command/HTMLify.pm
index ae6ed918..bb348d67 100644
--- a/fml/lib/FML/Command/HTMLify.pm
+++ b/fml/lib/FML/Command/HTMLify.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: HTMLify.pm,v 1.20 2004/01/01 23:52:10 fukachan Exp $
+# $FML: HTMLify.pm,v 1.21 2004/01/02 14:50:30 fukachan Exp $
#
package FML::Command::HTMLify;
@@ -25,8 +25,8 @@ FML::Command::HTMLify - utility functions to convert text to html.
=head1 DESCRIPTION
-This module provides several utility functions to send back article
-and file in C<$ml_home_dir>.
+This module provides several utility functions to convert text file to
+html format.
=head1 METHODS
@@ -64,13 +64,13 @@ sub convert
my $index_order = $config->{ html_archive_index_order_type };
my $htmlifier_args = {
- charset => $charset,
+ charset => $charset,
- output_dir => $dst_dir, # ~fml/public_html/mlarchive/$domain/$ml/
- db_base_dir => $udb_dir, # /var/spool/ml/@udb@
- db_name => $ml_name, # elena
+ output_dir => $dst_dir, # ~fml/public_html/mlarchive/$domain/$ml/
+ db_base_dir => $udb_dir, # /var/spool/ml/@udb@
+ db_name => $ml_name, # elena
- index_order => $index_order, # normal/reverse
+ index_order => $index_order, # normal/reverse
};
my ($is_subdir_exists, $subdirs) = _check_subdir_exists($src_dir);
@@ -85,6 +85,7 @@ sub convert
my (@x) = sort _sort_subdirs @$subdirs;
print STDERR " subdirs: @x\n" if $debug;
for my $xdir (@x) {
+ # XXX-TODO: hmm, naming ? $obj->htmlify_dir(...).
eval q{
use Mail::Message::ToHTML;
my $obj = new Mail::Message::ToHTML $htmlifier_args;
@@ -127,21 +128,24 @@ sub _sort_subdirs
# Arguments: STR($src_dir)
# Side Effects: none
# Return Value: ARRAY( STR, ARRAY_REF )
-sub _check_subdir_exists
+sub _check_subdir_exists
{
my ($src_dir) = @_;
- my $status = 0;
- my $subdir = '';
- my @subdir = ();
+ my $status = 0;
+ my $subdir = '';
+ my @subdir = ();
use File::Spec;
use DirHandle;
my $dh = new DirHandle $src_dir;
if (defined $dh) {
- while (defined($_ = $dh->read)) {
- next if /^\./;
- $subdir = File::Spec->catfile($src_dir, $_);
+ my $e;
+ ENTRY:
+ while (defined($e = $dh->read)) {
+ next ENTRY if $e =~ /^\./o;
+
+ $subdir = File::Spec->catfile($src_dir, $e);
if (-d $subdir) {
push(@subdir, $subdir);
$status = 1;