X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXUser.pm;h=ca73a02ed2ffde0668dd9b4ce7e047a4ce3d3742;hb=5e7031a532b4df6beb475aa3e7e3f6eec29360a6;hp=0785d16b2c1b1a6c1945ef41cc67a074b0a5dbbb;hpb=0a26d8269de811ac52450fcb411ebac7cab1d382;p=spider.git diff --git a/perl/DXUser.pm b/perl/DXUser.pm index 0785d16b..ca73a02e 100644 --- a/perl/DXUser.pm +++ b/perl/DXUser.pm @@ -77,6 +77,9 @@ sub AUTOLOAD $name =~ s/.*:://o; confess "Non-existant field '$AUTOLOAD'" if !$valid{$name}; + # 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}} ; if (@_) { $self->{$name} = shift; } @@ -337,7 +340,7 @@ BEGIN { # try to detect a lockfile (this isn't atomic but # should do for now - $lockfn = "$root/perl/cluster.lock"; # lock file name + $lockfn = "$root/perl/cluster.lck"; # lock file name if (-e $lockfn) { open(CLLOCK, "$lockfn") or die "Can't open Lockfile ($lockfn) $!"; my $pid = ;