summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-12-11 16:13:03 +0000
committerfukachan <fukachan>2001-12-11 16:13:03 +0000
commit7e3c2716b2fca9d42d8b5149bcab7c5917c3dfb0 (patch)
tree605e172a9db481dadf921a2fc6e3e44817cb8601
parenta3b7eeadfd354bc8e1f2d4644b87e9d2d8c0d939 (diff)
downloadfml8-7e3c2716b2fca9d42d8b5149bcab7c5917c3dfb0.tar.gz
fml8-7e3c2716b2fca9d42d8b5149bcab7c5917c3dfb0.tar.bz2
fml8-7e3c2716b2fca9d42d8b5149bcab7c5917c3dfb0.zip
speculate $user by $$ unless defined $user
-rw-r--r--fml/lib/TinyScheduler.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/fml/lib/TinyScheduler.pm b/fml/lib/TinyScheduler.pm
index 6f0ccd68..56c2a783 100644
--- a/fml/lib/TinyScheduler.pm
+++ b/fml/lib/TinyScheduler.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: TinyScheduler.pm,v 1.11 2001/11/27 11:32:34 fukachan Exp $
+# $FML: TinyScheduler.pm,v 1.12 2001/12/08 14:31:32 fukachan Exp $
#
package TinyScheduler;
@@ -65,6 +65,11 @@ sub new
# default directory to hold schdule file(s): ~/.schedule/ by default
use User::pwent;
+ unless (defined $user) {
+ my $p = getpwuid($<);
+ $user = $p->name;
+ }
+
my $pw = getpwnam($user);
my $home_dir = $pw->dir;