X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXUser.pm;h=892f1a59d1e7d1ea61d6c1b08b1fa66a4b517a3f;hb=942cdc8c6434db4e2cf77b43ec26c0059768f853;hp=dec317a1928623ca40e004819cd473fdb53bda53;hpb=7b616aeabce92e3cb416a5fe6640a288adfe5410;p=spider.git diff --git a/perl/DXUser.pm b/perl/DXUser.pm index dec317a1..892f1a59 100644 --- a/perl/DXUser.pm +++ b/perl/DXUser.pm @@ -91,6 +91,7 @@ $lrusize = 2000; #no strict; sub AUTOLOAD { + my $self = shift; no strict; my $name = $AUTOLOAD; @@ -101,7 +102,12 @@ sub AUTOLOAD # this clever line of code creates a subroutine which takes over from autoload # from OO Perl - Conway *$AUTOLOAD = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}}; - goto &$AUTOLOAD; + &$AUTOLOAD($self, @_); +# *{$AUTOLOAD} = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}} ; +# if (@_) { +# $self->{$name} = shift; +# } +# return $self->{$name}; } #use strict; @@ -369,7 +375,7 @@ BEGIN { # try to detect a lockfile (this isn't atomic but # should do for now - $lockfn = "$root/perl/cluster.lck"; # lock file name + $lockfn = "$root/local/cluster.lck"; # lock file name if (-e $lockfn) { open(CLLOCK, "$lockfn") or die "Can't open Lockfile ($lockfn) $!"; my $pid = ;