summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-02-01 12:03:55 +0000
committerfukachan <fukachan>2002-02-01 12:03:55 +0000
commita176a2ad4ac5fd35a3a056dd3828c0dbb1da0e6d (patch)
treec06f02bd93f73f40c2cafff8c461d73731b15b6d
parenteec3fb6d6aa9ffe509abbab89f304f450295d860 (diff)
downloadfml8-a176a2ad4ac5fd35a3a056dd3828c0dbb1da0e6d.tar.gz
fml8-a176a2ad4ac5fd35a3a056dd3828c0dbb1da0e6d.tar.bz2
fml8-a176a2ad4ac5fd35a3a056dd3828c0dbb1da0e6d.zip
remove $ENV{debug} based toggle flagsubdir-base
-rw-r--r--fml/lib/FML/Config.pm10
-rw-r--r--fml/lib/FML/Filter/HeaderCheck.pm4
-rw-r--r--fml/lib/FML/Language/Japanese/Utils.pm6
-rw-r--r--fml/lib/FML/Process/CGI/Kernel.pm4
-rw-r--r--fml/lib/FML/Process/HTMLify.pm8
-rw-r--r--fml/lib/FML/Process/Kernel.pm6
-rw-r--r--fml/lib/FML/Process/Switch.pm7
-rw-r--r--fml/lib/FML/Process/ThreadTrack.pm6
-rw-r--r--fml/lib/File/Sequence.pm10
-rw-r--r--fml/lib/IO/Adapter.pm6
-rw-r--r--fml/lib/IO/Adapter/DBI.pm6
-rw-r--r--fml/lib/IO/Adapter/MySQL.pm8
-rw-r--r--fml/lib/IO/Adapter/SQL/toymodel.pm10
-rw-r--r--fml/lib/Mail/Bounce.pm4
-rw-r--r--fml/lib/Mail/Bounce/DSN.pm4
-rw-r--r--fml/lib/Mail/Bounce/FixBrokenAddress.pm8
-rw-r--r--fml/lib/Mail/Bounce/Language/Japanese.pm8
-rw-r--r--fml/lib/Mail/Bounce/Postfix19991231.pm8
-rw-r--r--fml/lib/Mail/Bounce/SimpleMatch.pm4
-rw-r--r--fml/lib/Mail/HTML/Lite.pm10
-rw-r--r--fml/lib/Mail/Message.pm6
-rw-r--r--fml/lib/Mail/ThreadTrack/Analyze.pm6
-rw-r--r--fml/lib/Mail/ThreadTrack/DB.pm4
-rw-r--r--fml/lib/Tie/JournaledDir.pm4
-rw-r--r--fml/lib/Tie/JournaledFile.pm4
25 files changed, 89 insertions, 72 deletions
diff --git a/fml/lib/FML/Config.pm b/fml/lib/FML/Config.pm
index 10d731a5..fede8bfa 100644
--- a/fml/lib/FML/Config.pm
+++ b/fml/lib/FML/Config.pm
@@ -1,11 +1,13 @@
#-*- perl -*-
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
#
-# $FML: Config.pm,v 1.49 2002/01/13 13:35:24 fukachan Exp $
+# $FML: Config.pm,v 1.50 2002/01/30 14:51:15 fukachan Exp $
#
package FML::Config;
+my $debug = 0;
+
use strict;
use Carp;
use vars qw($need_expansion_variables
@@ -292,7 +294,7 @@ sub _read_file
$comment->{ $key } = $comment_buffer;
undef $comment_buffer;
- print STDERR "push(@$order, $key);\n" if $ENV{'debug'};
+ print STDERR "push(@$order, $key);\n" if $debug;
push(@$order, $key);
}
}
@@ -374,7 +376,7 @@ sub read
});
# XXX debug: removed in the future
- if ($ENV{'debug'}) {
+ if ($debug) {
my ($k, $v);
while (($k, $v) = each %$config) {
print STDERR "\nconfig{ $k } =>\n";
@@ -422,7 +424,7 @@ sub write
# XXX get variable list modified in this process
my $newkeys = $self->{ _newly_added_keys };
for my $k (@$order, @$newkeys) {
- if ($ENV{'debug'} && defined $comment->{$k}) {
+ if ($debug && defined $comment->{$k}) {
print STDERR "write.config{ ", $comment->{$k}, " }";
print STDERR join("\n\t", split(/\s+/, $config->{$k})), "\n";
}
diff --git a/fml/lib/FML/Filter/HeaderCheck.pm b/fml/lib/FML/Filter/HeaderCheck.pm
index 764b5851..69af8709 100644
--- a/fml/lib/FML/Filter/HeaderCheck.pm
+++ b/fml/lib/FML/Filter/HeaderCheck.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: HeaderCheck.pm,v 1.10 2002/01/16 13:33:59 fukachan Exp $
+# $FML: HeaderCheck.pm,v 1.11 2002/01/16 13:43:19 fukachan Exp $
#
package FML::Filter::HeaderCheck;
@@ -33,7 +33,7 @@ usual constructor.
=cut
-my $debug = $ENV{'debug'} ? 1 : 0;
+my $debug = 0;
my (@default_rules) = qw(is_valid_message_id);
diff --git a/fml/lib/FML/Language/Japanese/Utils.pm b/fml/lib/FML/Language/Japanese/Utils.pm
index cac2a509..658a1a0f 100644
--- a/fml/lib/FML/Language/Japanese/Utils.pm
+++ b/fml/lib/FML/Language/Japanese/Utils.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: Utils.pm,v 1.4 2001/12/22 09:21:08 fukachan Exp $
+# $FML: Utils.pm,v 1.5 2001/12/23 12:19:13 fukachan Exp $
#
package FML::Language::Japanese::Utils;
@@ -12,6 +12,8 @@ use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
+my $debug = 0;
+
=head1 NAME
FML::Language::Japanese::Utils - what is this
@@ -129,7 +131,7 @@ sub compare_euc_string
$loc = index($pa, $pat);
}
- print STDERR "buf = <$a> pa=<$pa> pat=<$pat> loc=$loc\n" if $ENV{'debug'};
+ print STDERR "buf = <$a> pa=<$pa> pat=<$pat> loc=$loc\n" if $debug;
return 1 if ($loc % 2) == 0;
diff --git a/fml/lib/FML/Process/CGI/Kernel.pm b/fml/lib/FML/Process/CGI/Kernel.pm
index a120bd32..79ca554e 100644
--- a/fml/lib/FML/Process/CGI/Kernel.pm
+++ b/fml/lib/FML/Process/CGI/Kernel.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: Kernel.pm,v 1.12 2001/12/23 11:39:46 fukachan Exp $
+# $FML: Kernel.pm,v 1.13 2002/01/30 15:20:30 fukachan Exp $
#
package FML::Process::CGI::Kernel;
@@ -210,8 +210,6 @@ sub AUTOLOAD
return if $AUTOLOAD =~ /DESTROY/;
- if (defined $ENV{'debug'}) { my (@c) = caller; warn("AUTOLOAD: @c");}
-
my $comname = $AUTOLOAD;
$comname =~ s/.*:://;
diff --git a/fml/lib/FML/Process/HTMLify.pm b/fml/lib/FML/Process/HTMLify.pm
index e6f4ce65..b0903b49 100644
--- a/fml/lib/FML/Process/HTMLify.pm
+++ b/fml/lib/FML/Process/HTMLify.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000-2001 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: HTMLify.pm,v 1.6 2001/12/22 09:21:09 fukachan Exp $
+# $FML: HTMLify.pm,v 1.7 2001/12/23 07:04:30 fukachan Exp $
#
package FML::Process::HTMLify;
@@ -16,6 +16,8 @@ use FML::Process::Kernel;
use FML::Log qw(Log LogWarn LogError);
use FML::Config;
+my $debug = 0;
+
@ISA = qw(FML::Process::Kernel);
@@ -95,11 +97,11 @@ sub run
my $src_dir = $argv->[0];
my $dst_dir = $argv->[1];
- print STDERR "htmlify\t$src_dir =>\n\t\t$dst_dir\n" if $ENV{'debug'};
+ print STDERR "htmlify\t$src_dir =>\n\t\t$dst_dir\n" if $debug;
# prepend $opt_I as @INC
if (defined $options->{ I }) {
- print STDERR "\t\tprepend $options->{ I } (\@INC)\n" if $ENV{'debug'};
+ print STDERR "\t\tprepend $options->{ I } (\@INC)\n" if $debug;
unshift(@INC, $options->{ I });
}
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm
index 418a1bf9..6c70eb7d 100644
--- a/fml/lib/FML/Process/Kernel.pm
+++ b/fml/lib/FML/Process/Kernel.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: Kernel.pm,v 1.71 2002/01/20 13:47:07 fukachan Exp $
+# $FML: Kernel.pm,v 1.72 2002/01/30 15:27:59 fukachan Exp $
#
package FML::Process::Kernel;
@@ -14,6 +14,8 @@ use Carp;
use vars qw(@ISA);
use File::Spec;
+my $debug = 0;
+
=head1 NAME
FML::Process::Kernel - provide fml core functions
@@ -187,7 +189,7 @@ sub _trap_help
my $option = $curproc->command_line_options();
if (defined $option->{ help }) {
- print STDERR "FML::Process::Kernel trapped\n" if defined $ENV{'debug'};
+ print STDERR "FML::Process::Kernel trapped\n" if $debug;
if ($curproc->can('help')) {
$curproc->help();
}
diff --git a/fml/lib/FML/Process/Switch.pm b/fml/lib/FML/Process/Switch.pm
index 2089d58d..7e43c83f 100644
--- a/fml/lib/FML/Process/Switch.pm
+++ b/fml/lib/FML/Process/Switch.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: Switch.pm,v 1.50 2001/12/23 11:37:07 fukachan Exp $
+# $FML: Switch.pm,v 1.51 2002/01/30 15:12:44 fukachan Exp $
#
package FML::Process::Switch;
@@ -179,8 +179,7 @@ sub main::Bootstrap2
my $reason = $@;
if ($obj->can('help')) { eval $obj->help();};
- if ($ENV{'debug'} ||
- defined( $main_cf->{ debug } ) ||
+ if (defined( $main_cf->{ debug } ) ||
defined $options{debug}) {
croak($reason);
}
@@ -501,7 +500,7 @@ sub _module_we_use
return '';
}
- print STDERR "module = $pkg (for $0)\n" if $ENV{'debug'};
+ print STDERR "module = $pkg (for $0)\n" if $debug;
return $pkg;
}
diff --git a/fml/lib/FML/Process/ThreadTrack.pm b/fml/lib/FML/Process/ThreadTrack.pm
index 92177ad4..452544d6 100644
--- a/fml/lib/FML/Process/ThreadTrack.pm
+++ b/fml/lib/FML/Process/ThreadTrack.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000-2001 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: ThreadTrack.pm,v 1.18 2001/12/22 09:21:10 fukachan Exp $
+# $FML: ThreadTrack.pm,v 1.19 2001/12/23 11:37:08 fukachan Exp $
#
package FML::Process::ThreadTrack;
@@ -137,7 +137,7 @@ sub run
$thread->db_mkdb($last_id, $max_id);
}
elsif ($command eq 'db_rebuild') {
- print STDERR "\$thread->db_mkdb(1, $max_id);\n" if $ENV{'debug'};
+ print STDERR "\$thread->db_mkdb(1, $max_id);\n" if $debug;
$thread->db_mkdb(1, $max_id);
}
elsif ($command eq 'db_clear') {
@@ -282,7 +282,7 @@ sub _close
$thread->close($id);
}
else {
- Log("thread_id=$id not exists") if $ENV{'debug'};
+ Log("thread_id=$id not exists") if $debug;
}
}
}
diff --git a/fml/lib/File/Sequence.pm b/fml/lib/File/Sequence.pm
index 656f63e7..703bc7d9 100644
--- a/fml/lib/File/Sequence.pm
+++ b/fml/lib/File/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 2002/01/13 13:35:25 fukachan Exp $
+# $FML: Sequence.pm,v 1.17 2002/01/27 08:28:11 fukachan Exp $
#
package File::Sequence;
@@ -13,6 +13,8 @@ use vars qw(@ISA @EXPORT @EXPORT_OK);
use Carp;
use ErrorStatus qw(error_set error error_clear);
+my $debug = 0;
+
=head1 NAME
File::Sequence - maintain the sequence number
@@ -248,19 +250,19 @@ sub _search_max_id_from_bottom
my $hash = $args->{ hash };
($pebot, $v) = each %$hash;
- print STDERR "0. ", $pebot, "\n" if defined $ENV{'debug'};
+ print STDERR "0. ", $pebot, "\n" if $debug;
PEBOT_SEARCH:
while (1) {
last PEBOT_SEARCH unless defined $hash->{ $pebot + $unit };
$pebot += $unit;
- print STDERR "1. ", $pebot, "\n" if defined $ENV{'debug'};
+ print STDERR "1. ", $pebot, "\n" if $debug;
}
# increment by 1.
do {
$pebot++;
- print STDERR "2. ", $pebot, "\n" if defined $ENV{'debug'};
+ print STDERR "2. ", $pebot, "\n" if $debug;
} while (defined $hash->{ $pebot + 1 });
return $pebot;
diff --git a/fml/lib/IO/Adapter.pm b/fml/lib/IO/Adapter.pm
index 58b6cde1..03b03444 100644
--- a/fml/lib/IO/Adapter.pm
+++ b/fml/lib/IO/Adapter.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: Adapter.pm,v 1.13 2002/01/27 09:25:23 fukachan Exp $
+# $FML: Adapter.pm,v 1.14 2002/01/27 13:11:57 fukachan Exp $
#
package IO::Adapter;
@@ -13,6 +13,8 @@ use strict;
use Carp;
use IO::Adapter::ErrorStatus qw(error_set error error_clear);
+my $debug = 0;
+
# prepare error_set() is called
@ISA = qw(IO::Adapter::ErrorStatus);
@@ -193,7 +195,7 @@ sub new
@ORIG_ISA = @ISA unless $FirstTime++;
@ISA = ($pkg, @ORIG_ISA);
- printf STDERR "%-20s %s\n", "IO::Adapter::ISA:", "@ISA" if $ENV{'debug'};
+ printf STDERR "%-20s %s\n", "IO::Adapter::ISA:", "@ISA" if $debug;
eval qq{ require $pkg; $pkg->import();};
unless ($@) {
$pkg->configure($me, $args) if $pkg->can('configure');
diff --git a/fml/lib/IO/Adapter/DBI.pm b/fml/lib/IO/Adapter/DBI.pm
index 9b789c34..94b1e154 100644
--- a/fml/lib/IO/Adapter/DBI.pm
+++ b/fml/lib/IO/Adapter/DBI.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: DBI.pm,v 1.12 2002/01/27 09:25:24 fukachan Exp $
+# $FML: DBI.pm,v 1.13 2002/01/27 13:11:58 fukachan Exp $
#
package IO::Adapter::DBI;
@@ -13,6 +13,8 @@ use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
use IO::Adapter::ErrorStatus qw(error_set error error_clear);
+my $debug = 0;
+
=head1 NAME
IO::Adapter::DBI - DBI
@@ -73,7 +75,7 @@ sub execute
my $dbh = $self->{ _dbh };
my $query = $args->{ query };
- print STDERR "execute query={$query}\n" if $ENV{'debug'};
+ print STDERR "execute query={$query}\n" if $debug;
undef $self->{ _res };
diff --git a/fml/lib/IO/Adapter/MySQL.pm b/fml/lib/IO/Adapter/MySQL.pm
index e48395e6..44d9b0b7 100644
--- a/fml/lib/IO/Adapter/MySQL.pm
+++ b/fml/lib/IO/Adapter/MySQL.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: MySQL.pm,v 1.18 2001/12/24 07:40:57 fukachan Exp $
+# $FML: MySQL.pm,v 1.19 2002/01/27 13:11:58 fukachan Exp $
#
@@ -13,6 +13,8 @@ use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
+my $debug = 0;
+
use IO::Adapter::DBI;
@ISA = qw(IO::Adapter::DBI);
@@ -100,12 +102,12 @@ sub configure
# $self->{ _driver } is the $config->{ driver } object.
unless ($@) {
- printf STDERR "%-20s %s\n", "loading", $pkg if $ENV{'debug'};
+ printf STDERR "%-20s %s\n", "loading", $pkg if $debug;
@ISA = ($pkg, @ISA);
$me->{ _model_specific_driver } = $pkg;
- printf STDERR "%-20s %s\n", "MySQL::ISA:", "@ISA" if $ENV{'debug'};
+ printf STDERR "%-20s %s\n", "MySQL::ISA:", "@ISA" if $debug;
}
else {
error_set($self, $@);
diff --git a/fml/lib/IO/Adapter/SQL/toymodel.pm b/fml/lib/IO/Adapter/SQL/toymodel.pm
index b918eab4..facc26c0 100644
--- a/fml/lib/IO/Adapter/SQL/toymodel.pm
+++ b/fml/lib/IO/Adapter/SQL/toymodel.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: toymodel.pm,v 1.6 2001/12/24 07:40:57 fukachan Exp $
+# $FML: toymodel.pm,v 1.7 2001/12/24 07:44:35 fukachan Exp $
#
@@ -13,6 +13,8 @@ use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
+my $debug = 0;
+
=head1 NAME
IO::Adapter::SQL::toymodel - SQL statement dependent on toymodel
@@ -41,7 +43,7 @@ sub add
{
my ($self, $addr) = @_;
- print STDERR "add( $addr )\n" if $ENV{'debug'};
+ print STDERR "add( $addr )\n" if $debug;
my $query = $self->_build_sql_query({
query => 'add',
@@ -60,7 +62,7 @@ sub delete
{
my ($self, $addr) = @_;
- print STDERR "delete( $addr )\n" if $ENV{'debug'};
+ print STDERR "delete( $addr )\n" if $debug;
my $query = $self->_build_sql_query({
query => 'delete',
@@ -160,7 +162,7 @@ sub _build_sql_query
my $file = $self->{ _params }->{ file };
my $table = $self->{ _table };
- print STDERR "_build_sql_query( query=$query )\n" if $ENV{'debug'};
+ print STDERR "_build_sql_query( query=$query )\n" if $debug;
if ($query eq 'add') {
"insert into $table values ('$ml_name', '$file', '$address', 0, 0)";
diff --git a/fml/lib/Mail/Bounce.pm b/fml/lib/Mail/Bounce.pm
index c74798b2..8023f389 100644
--- a/fml/lib/Mail/Bounce.pm
+++ b/fml/lib/Mail/Bounce.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: Bounce.pm,v 1.18 2002/01/16 13:34:01 fukachan Exp $
+# $FML: Bounce.pm,v 1.19 2002/01/16 13:43:21 fukachan Exp $
#
package Mail::Bounce;
@@ -12,7 +12,7 @@ use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
-my $debug = $ENV{'debug'} ? 1 : 0;
+my $debug = 0;
=head1 NAME
diff --git a/fml/lib/Mail/Bounce/DSN.pm b/fml/lib/Mail/Bounce/DSN.pm
index 9e22c6f3..62a3b2c6 100644
--- a/fml/lib/Mail/Bounce/DSN.pm
+++ b/fml/lib/Mail/Bounce/DSN.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: DSN.pm,v 1.15 2002/01/16 13:34:02 fukachan Exp $
+# $FML: DSN.pm,v 1.16 2002/01/16 13:43:21 fukachan Exp $
#
@@ -14,7 +14,7 @@ use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
-my $debug = $ENV{'debug'} ? 1 : 0;
+my $debug = 0;
@ISA = qw(Mail::Bounce);
diff --git a/fml/lib/Mail/Bounce/FixBrokenAddress.pm b/fml/lib/Mail/Bounce/FixBrokenAddress.pm
index 361a8d52..648f8dc6 100644
--- a/fml/lib/Mail/Bounce/FixBrokenAddress.pm
+++ b/fml/lib/Mail/Bounce/FixBrokenAddress.pm
@@ -1,10 +1,10 @@
#-*- perl -*-
#
-# Copyright (C) 2001 Ken'ichi Fukamachi
+# Copyright (C) 2001,2002 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: FixBrokenAddress.pm,v 1.4 2001/12/22 09:21:15 fukachan Exp $
+# $FML: FixBrokenAddress.pm,v 1.5 2001/12/23 15:03:27 fukachan Exp $
#
@@ -14,7 +14,7 @@ use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
-my $debug = $ENV{'debug'} ? 1 : 0;
+my $debug = 0;
@ISA = qw(Mail::Bounce);
@@ -73,7 +73,7 @@ Ken'ichi Fukamachi
=head1 COPYRIGHT
-Copyright (C) 2001 Ken'ichi Fukamachi
+Copyright (C) 2001,2002 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/Mail/Bounce/Language/Japanese.pm b/fml/lib/Mail/Bounce/Language/Japanese.pm
index f50f85ef..6829cb46 100644
--- a/fml/lib/Mail/Bounce/Language/Japanese.pm
+++ b/fml/lib/Mail/Bounce/Language/Japanese.pm
@@ -1,10 +1,10 @@
#-*- perl -*-
#
-# Copyright (C) 2001 Ken'ichi Fukamachi
+# Copyright (C) 2001,2002 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: Japanese.pm,v 1.3 2001/12/22 09:21:16 fukachan Exp $
+# $FML: Japanese.pm,v 1.4 2001/12/24 02:26:33 fukachan Exp $
#
#
@@ -17,7 +17,7 @@ use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
-my $debug = $ENV{'debug'} ? 1 : 0;
+my $debug = 0;
@ISA = qw(Mail::Bounce);
@@ -111,7 +111,7 @@ Ken'ichi Fukamachi
=head1 COPYRIGHT
-Copyright (C) 2001 Ken'ichi Fukamachi
+Copyright (C) 2001,2002 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/Mail/Bounce/Postfix19991231.pm b/fml/lib/Mail/Bounce/Postfix19991231.pm
index 4082e306..9033713a 100644
--- a/fml/lib/Mail/Bounce/Postfix19991231.pm
+++ b/fml/lib/Mail/Bounce/Postfix19991231.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: Postfix19991231.pm,v 1.14 2002/01/16 13:34:02 fukachan Exp $
+# $FML: Postfix19991231.pm,v 1.15 2002/01/16 13:43:21 fukachan Exp $
#
@@ -14,6 +14,8 @@ use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
+my $debug = 0;
+
@ISA = qw(Mail::Bounce);
=head1 NAME
@@ -90,7 +92,7 @@ sub _analyze_plaintext
my $data = $m->nth_paragraph( $i + 1 );
# debug
- print STDERR "paragraph($i){$data}\n" if $ENV{'debug'};
+ print STDERR "paragraph($i){$data}\n" if $debug;
if ($data =~ /$pattern/) { $state = 1;}
if ($data =~ /$end_pattern/) { $state = 0;}
@@ -126,7 +128,7 @@ sub _analyze_broken_dsn
my $data = $m->nth_paragraph( $i + 1 );
# debug
- print STDERR "paragraph($i){$data}\n" if $ENV{'debug'};
+ print STDERR "paragraph($i){$data}\n" if $debug;
if ($data =~ /\<(\S+\@\S+\w+)\>:\s*(.*)/) {
$self->_parse_address($data, $result);
diff --git a/fml/lib/Mail/Bounce/SimpleMatch.pm b/fml/lib/Mail/Bounce/SimpleMatch.pm
index 11f1d09e..47a78432 100644
--- a/fml/lib/Mail/Bounce/SimpleMatch.pm
+++ b/fml/lib/Mail/Bounce/SimpleMatch.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: SimpleMatch.pm,v 1.27 2002/01/16 13:34:02 fukachan Exp $
+# $FML: SimpleMatch.pm,v 1.28 2002/01/16 13:43:21 fukachan Exp $
#
@@ -46,7 +46,7 @@ When we trap C<end>, the state changes from l to 0.
=cut
-my $debug = $ENV{'debug'} ? 1 : 0;
+my $debug = 0;
my $address_trap_regexp = {
diff --git a/fml/lib/Mail/HTML/Lite.pm b/fml/lib/Mail/HTML/Lite.pm
index c350cdd7..035d42d5 100644
--- a/fml/lib/Mail/HTML/Lite.pm
+++ b/fml/lib/Mail/HTML/Lite.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: Lite.pm,v 1.37 2002/01/14 11:59:02 fukachan Exp $
+# $FML: Lite.pm,v 1.38 2002/01/16 13:34:03 fukachan Exp $
#
package Mail::HTML::Lite;
@@ -12,10 +12,10 @@ use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
-my $debug = $ENV{'debug'} ? 1 : 0;
+my $debug = 0;
my $URL = "<A HREF=\"http://www.fml.org/software/\">Mail::HTML::Lite</A>";
-my $version = q$FML: Lite.pm,v 1.37 2002/01/14 11:59:02 fukachan Exp $;
+my $version = q$FML: Lite.pm,v 1.38 2002/01/16 13:34:03 fukachan Exp $;
if ($version =~ /,v\s+([\d\.]+)\s+/) {
$version = "$URL $1";
}
@@ -2291,7 +2291,7 @@ sub htmlify_file
directory => $dst_dir,
};
- if (defined $ENV{'debug'}) {
+ if ($debug) {
printf STDERR "htmlify_file( id=%-6s src=%s )\n", $id, $file;
}
@@ -2307,7 +2307,7 @@ sub htmlify_file
# no more action for old files
if ($html->is_ignore($id)) {
- warn("not process $id (already exists)") if defined $ENV{'debug'};
+ warn("not process $id (already exists)") if $debug;
}
else {
printf STDERR " converted( id=%-6s src=%s )\n", $id, $file;
diff --git a/fml/lib/Mail/Message.pm b/fml/lib/Mail/Message.pm
index 034a1460..209f11a8 100644
--- a/fml/lib/Mail/Message.pm
+++ b/fml/lib/Mail/Message.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: Message.pm,v 1.46 2002/01/16 14:01:14 fukachan Exp $
+# $FML: Message.pm,v 1.47 2002/01/18 15:38:41 fukachan Exp $
#
package Mail::Message;
@@ -12,7 +12,7 @@ use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD $InComingMessage);
use Carp;
-my $debug = $ENV{'debug'} ? $ENV{'debug'} : 0;
+my $debug = 0;
# virtual content-type
my %virtual_data_type =
@@ -1318,7 +1318,7 @@ sub parse_and_build_mime_multipart_chain
if ($debug) {
my $r = substr($$data, $pb, $pe - $pb);
print "[ data_type=$args->{ data_type } ]\n";
- print "{$r}\n" if $ENV{'debug'} > 1;
+ print "{$r}\n" if $debug > 1;
}
$m[ $i++ ] = $self->_alloc_new_part($args);
diff --git a/fml/lib/Mail/ThreadTrack/Analyze.pm b/fml/lib/Mail/ThreadTrack/Analyze.pm
index 483bd3a2..0ed5ee27 100644
--- a/fml/lib/Mail/ThreadTrack/Analyze.pm
+++ b/fml/lib/Mail/ThreadTrack/Analyze.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: Analyze.pm,v 1.23 2002/01/16 13:34:04 fukachan Exp $
+# $FML: Analyze.pm,v 1.24 2002/01/16 13:43:22 fukachan Exp $
#
package Mail::ThreadTrack::Analyze;
@@ -12,7 +12,7 @@ use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
-my $debug = defined $ENV{'debug'} ? 1 : 0;
+my $debug = 0;
=head1 NAME
@@ -283,7 +283,7 @@ sub _is_ignore
while (($field, $rule) = each %$filterlist) {
if (defined $header->get($field)) {
my $value = $header->get($field);
- if ($ENV{'debug'}) {
+ if ($debug) {
print STDERR "ignore $field: $value\n" if $value =~ /$rule/m;
}
return 1 if $value =~ /$rule/;
diff --git a/fml/lib/Mail/ThreadTrack/DB.pm b/fml/lib/Mail/ThreadTrack/DB.pm
index 3b83e7fa..6fea43e1 100644
--- a/fml/lib/Mail/ThreadTrack/DB.pm
+++ b/fml/lib/Mail/ThreadTrack/DB.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: DB.pm,v 1.19 2002/01/13 13:35:30 fukachan Exp $
+# $FML: DB.pm,v 1.20 2002/01/30 14:51:16 fukachan Exp $
#
package Mail::ThreadTrack::DB;
@@ -12,7 +12,7 @@ use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
-my $debug = defined $ENV{'debug'} ? 1 : 0;
+my $debug = 0;
=head1 NAME
diff --git a/fml/lib/Tie/JournaledDir.pm b/fml/lib/Tie/JournaledDir.pm
index e8df92a8..238b65ce 100644
--- a/fml/lib/Tie/JournaledDir.pm
+++ b/fml/lib/Tie/JournaledDir.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: JournaledDir.pm,v 1.6 2001/12/22 09:21:22 fukachan Exp $
+# $FML: JournaledDir.pm,v 1.7 2001/12/26 14:23:31 fukachan Exp $
#
package Tie::JournaledDir;
@@ -77,7 +77,7 @@ It uses C<Tie::JournaledFile> in background.
use Tie::JournaledFile;
-my $debug = $ENV{'debug'} ? 1 :0;
+my $debug = 0;
# Descriptions: constructor
diff --git a/fml/lib/Tie/JournaledFile.pm b/fml/lib/Tie/JournaledFile.pm
index c35fc942..f28fa549 100644
--- a/fml/lib/Tie/JournaledFile.pm
+++ b/fml/lib/Tie/JournaledFile.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: JournaledFile.pm,v 1.11 2001/12/22 09:21:22 fukachan Exp $
+# $FML: JournaledFile.pm,v 1.12 2001/12/26 14:23:31 fukachan Exp $
#
package Tie::JournaledFile;
@@ -69,7 +69,7 @@ standard hash functions.
=cut
-my $debug = $ENV{'debug'} ? 1 : 0;
+my $debug = 0;
# Descriptions: constructor