projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2. Add full individual checking for all PC protocol fields in all messages
[spider.git]
/
perl
/
DXCluster.pm
diff --git
a/perl/DXCluster.pm
b/perl/DXCluster.pm
index 5d35e4a3051adc784a2c2e40fabc81c332f277f2..2160846547e9e542b5c80413c3bc8c1201e46ccf 100644
(file)
--- a/
perl/DXCluster.pm
+++ b/
perl/DXCluster.pm
@@
-153,6
+153,9
@@
sub AUTOLOAD
$name =~ s/.*:://o;
confess "Non-existant field '$AUTOLOAD'" if !$valid{$name};
$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}} ;
@_ ? $self->{$name} = shift : $self->{$name} ;
}
@_ ? $self->{$name} = shift : $self->{$name} ;
}