summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-06-01 03:01:52 +0000
committerfukachan <fukachan>2002-06-01 03:01:52 +0000
commit79d8ab97822af34edc1985e33fb14f209c63676c (patch)
treef77d76a4d1c1d929d6a36b79789d78a14ee9f0ec /fml/lib/FML/Process
parentceb2ec733ea4470f8056af2a305653dca4dc836f (diff)
downloadfml8-79d8ab97822af34edc1985e33fb14f209c63676c.tar.gz
fml8-79d8ab97822af34edc1985e33fb14f209c63676c.tar.bz2
fml8-79d8ab97822af34edc1985e33fb14f209c63676c.zip
defined() overhaul
Diffstat (limited to 'fml/lib/FML/Process')
-rw-r--r--fml/lib/FML/Process/Kernel.pm17
-rw-r--r--fml/lib/FML/Process/Utils.pm8
2 files changed, 17 insertions, 8 deletions
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm
index 4a1532f9..31dfa1e3 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.101 2002/05/27 08:55:43 fukachan Exp $
+# $FML: Kernel.pm,v 1.102 2002/05/30 16:06:57 fukachan Exp $
#
package FML::Process::Kernel;
@@ -472,9 +472,11 @@ sub parse_incoming_message
modulus => $modulus,
};
- my $wh = $obj->open();
- $msg->print($wh);
- $obj->close();
+ if (defined $obj) {
+ my $wh = $obj->open();
+ $msg->print($wh) if defined $wh;
+ $obj->close();
+ }
}
}
@@ -1279,7 +1281,12 @@ sub open_outgoing_message_channel
modulus => $modulus,
};
- return $obj->open();
+ if (defined $obj) {
+ return $obj->open();
+ }
+ else {
+ return undef;
+ }
}
return undef;
diff --git a/fml/lib/FML/Process/Utils.pm b/fml/lib/FML/Process/Utils.pm
index 6b41a6c6..e1c0798f 100644
--- a/fml/lib/FML/Process/Utils.pm
+++ b/fml/lib/FML/Process/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.21 2002/05/25 06:58:24 fukachan Exp $
+# $FML: Utils.pm,v 1.22 2002/05/27 08:45:41 fukachan Exp $
#
package FML::Process::Utils;
@@ -371,8 +371,10 @@ sub __ml_home_prefix_search_in_virtual_maps
MAP:
for my $map (@$virtual_maps) {
my $obj = new IO::Adapter $map;
- $obj->open();
- $dir = $obj->find("^$virtual_domain");
+ if (defined $obj) {
+ $obj->open();
+ $dir = $obj->find("^$virtual_domain");
+ }
last MAP if $dir;
}
($virtual_domain, $dir) = split(/\s+/, $dir);