projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add an ARC Mail hack
[spider.git]
/
perl
/
Bands.pm
diff --git
a/perl/Bands.pm
b/perl/Bands.pm
index 16a992ed603c77c9da3218a07f49661badeec13a..d40d4c823d1dfe032579a39b7009dbb4dc86b2f8 100644
(file)
--- a/
perl/Bands.pm
+++ b/
perl/Bands.pm
@@
-139,6
+139,9
@@
sub AUTOLOAD
return if $name =~ /::DESTROY$/;
$name =~ s/.*:://o;
return if $name =~ /::DESTROY$/;
$name =~ s/.*:://o;
+ # 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} ;
}