summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-03-28 11:05:25 +0000
committerfukachan <fukachan>2003-03-28 11:05:25 +0000
commit4262a8c525a29d9454889dae9a2c06cd8e00532a (patch)
treee4c62d4450e4563fca84f1956e713ed56b5ccd46
parent48c2e739e322d0c3d048f9e5d3f8eebc2da45bbd (diff)
downloadfml8-4262a8c525a29d9454889dae9a2c06cd8e00532a.tar.gz
fml8-4262a8c525a29d9454889dae9a2c06cd8e00532a.tar.bz2
fml8-4262a8c525a29d9454889dae9a2c06cd8e00532a.zip
special handling of IO::Adapter
-rwxr-xr-xregress/simulation/find_bad_style.pl13
-rwxr-xr-xregress/style/find_bad_style.pl13
2 files changed, 16 insertions, 10 deletions
diff --git a/regress/simulation/find_bad_style.pl b/regress/simulation/find_bad_style.pl
index d3a12b2e..e70f462a 100755
--- a/regress/simulation/find_bad_style.pl
+++ b/regress/simulation/find_bad_style.pl
@@ -5,7 +5,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: find_bad_style.pl,v 1.4 2003/01/11 16:08:44 fukachan Exp $
+# $FML: find_bad_style.pl,v 1.5 2003/01/29 13:35:27 fukachan Exp $
#
use strict;
@@ -14,6 +14,7 @@ use Carp;
my $in_sub = 0;
my $in_head = 0;
my $defined = 0;
+my $ioadapter = 0;
my $close = 0;
my $count = 0;
my $copyright = '';
@@ -70,9 +71,10 @@ while (<>) {
#
# 1. check the usage of open() and close() under not check of defined()
#
+ if (/IO::Adapter/) { $ioadapter = 1;};
if (/defined/) { $defined = 1;}
if (/\$\S+\-\>(close|open)/ && (!/^sub /) && (!/^=head/) && (!/\$self/)) {
- unless ($defined) {
+ unless ($defined || $ioadapter) {
$buf .= " ===> ". $_;
$buf =~ s/\n/\n\t/gm;
$buf =~ s/^/\t/;
@@ -127,9 +129,10 @@ while (<>) {
#
if (/^sub (\S+)|^\}/) {
undef $buf;
- $cur_fn = $1 . "()";
- $in_sub = 1;
- $defined = 0;
+ $cur_fn = $1 . "()";
+ $in_sub = 1;
+ $defined = 0;
+ $ioadapter = 0;
}
if (/^sub .*\}/ || /^\}/o) {
$in_sub = 0;
diff --git a/regress/style/find_bad_style.pl b/regress/style/find_bad_style.pl
index d3a12b2e..e70f462a 100755
--- a/regress/style/find_bad_style.pl
+++ b/regress/style/find_bad_style.pl
@@ -5,7 +5,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: find_bad_style.pl,v 1.4 2003/01/11 16:08:44 fukachan Exp $
+# $FML: find_bad_style.pl,v 1.5 2003/01/29 13:35:27 fukachan Exp $
#
use strict;
@@ -14,6 +14,7 @@ use Carp;
my $in_sub = 0;
my $in_head = 0;
my $defined = 0;
+my $ioadapter = 0;
my $close = 0;
my $count = 0;
my $copyright = '';
@@ -70,9 +71,10 @@ while (<>) {
#
# 1. check the usage of open() and close() under not check of defined()
#
+ if (/IO::Adapter/) { $ioadapter = 1;};
if (/defined/) { $defined = 1;}
if (/\$\S+\-\>(close|open)/ && (!/^sub /) && (!/^=head/) && (!/\$self/)) {
- unless ($defined) {
+ unless ($defined || $ioadapter) {
$buf .= " ===> ". $_;
$buf =~ s/\n/\n\t/gm;
$buf =~ s/^/\t/;
@@ -127,9 +129,10 @@ while (<>) {
#
if (/^sub (\S+)|^\}/) {
undef $buf;
- $cur_fn = $1 . "()";
- $in_sub = 1;
- $defined = 0;
+ $cur_fn = $1 . "()";
+ $in_sub = 1;
+ $defined = 0;
+ $ioadapter = 0;
}
if (/^sub .*\}/ || /^\}/o) {
$in_sub = 0;