summaryrefslogtreecommitdiff
path: root/fml/lib/FML
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 /fml/lib/FML
parenteec3fb6d6aa9ffe509abbab89f304f450295d860 (diff)
downloadfml8-subdir-base.tar.gz
fml8-subdir-base.tar.bz2
fml8-subdir-base.zip
remove $ENV{debug} based toggle flagsubdir-base
Diffstat (limited to 'fml/lib/FML')
-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
8 files changed, 28 insertions, 23 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;
}
}
}