summaryrefslogtreecommitdiff
path: root/fml
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-06-01 02:22:52 +0000
committerfukachan <fukachan>2002-06-01 02:22:52 +0000
commitceb2ec733ea4470f8056af2a305653dca4dc836f (patch)
tree17d228a7cea00661ff266e9d4ce2e0e77bfd5c87 /fml
parent67e1e682beb61276319893b1caf4d8dc24fe75c9 (diff)
downloadfml8-ceb2ec733ea4470f8056af2a305653dca4dc836f.tar.gz
fml8-ceb2ec733ea4470f8056af2a305653dca4dc836f.tar.bz2
fml8-ceb2ec733ea4470f8056af2a305653dca4dc836f.zip
FNF
defined() overhaul
Diffstat (limited to 'fml')
-rw-r--r--fml/lib/FML/Process/CGI/Kernel.pm44
1 files changed, 28 insertions, 16 deletions
diff --git a/fml/lib/FML/Process/CGI/Kernel.pm b/fml/lib/FML/Process/CGI/Kernel.pm
index ea28157d..7b66759d 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.26 2002/04/27 09:48:38 fukachan Exp $
+# $FML: Kernel.pm,v 1.27 2002/05/16 14:44:22 fukachan Exp $
#
package FML::Process::CGI::Kernel;
@@ -122,8 +122,16 @@ dummy method now.
=cut
+# Descriptions: dummy
+# Arguments: OBJ($self) HASH_REF($args)
+# Side Effects: none
+# Return Value: none
sub verify_request { 1;}
+# Descriptions: dummy
+# Arguments: OBJ($self) HASH_REF($args)
+# Side Effects: none
+# Return Value: none
sub finish { 1;}
@@ -281,19 +289,21 @@ sub get_ml_list
my $config = $curproc->{ config };
use File::Spec;
- my $cf = '';
-
use DirHandle;
- my $dh = new DirHandle $config->{ ml_home_prefix };
- my @dirlist;
- my $prefix = $config->{ ml_home_prefix };
- while ($_ = $dh->read()) {
- next if /^\./;
- next if /^\@/;
- $cf = File::Spec->catfile($prefix, $_, "config.cf");
- push(@dirlist, $_) if -f $cf;
+ my $dh = new DirHandle $config->{ ml_home_prefix };
+ my $prefix = $config->{ ml_home_prefix };
+ my $cf = '';
+ my @dirlist = ();
+
+ if (defined $dh) {
+ while ($_ = $dh->read()) {
+ next if /^\./;
+ next if /^\@/;
+ $cf = File::Spec->catfile($prefix, $_, "config.cf");
+ push(@dirlist, $_) if -f $cf;
+ }
+ $dh->close;
}
- $dh->close;
@dirlist = sort @dirlist;
return \@dirlist;
@@ -324,11 +334,13 @@ sub get_recipient_list
for my $map (@$list) {
my $io = new IO::Adapter $map;
my $key = '';
- $io->open();
- while (defined($key = $io->get_next_key())) {
- push(@$r, $key);
+ if (defined $io) {
+ $io->open();
+ while (defined($key = $io->get_next_key())) {
+ push(@$r, $key);
+ }
+ $io->close();
}
- $io->close();
}
return $r;