projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed some more protocol checking issues
[spider.git]
/
perl
/
DXChannel.pm
diff --git
a/perl/DXChannel.pm
b/perl/DXChannel.pm
index b7d32c44ad4f22e6a98693f7e531d373b61835fb..7a27a8f2bc3bd3a90eda6efaaf388e9c6bc312fc 100644
(file)
--- a/
perl/DXChannel.pm
+++ b/
perl/DXChannel.pm
@@
-466,8
+466,13
@@
sub AUTOLOAD
$name =~ s/.*:://o;
confess "Non-existant field '$AUTOLOAD'" if !$valid{$name};
$name =~ s/.*:://o;
confess "Non-existant field '$AUTOLOAD'" if !$valid{$name};
- @_ ? $self->{$name} = shift : $self->{$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} ;
}
}
+
1;
__END__;
1;
__END__;