X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FRoute.pm;h=a9f80fea4e3afe8b1e546c88444fd202467141f8;hb=7b616aeabce92e3cb416a5fe6640a288adfe5410;hp=387407669583ff325644bbc51d9517d1fc215de6;hpb=cb20a908914a9b9df907a63551312a69dfe884b5;p=spider.git diff --git a/perl/Route.pm b/perl/Route.pm index 38740766..a9f80fea 100644 --- a/perl/Route.pm +++ b/perl/Route.pm @@ -380,7 +380,6 @@ sub field_prompt # sub AUTOLOAD { - my $self = shift; no strict; my $name = $AUTOLOAD; return if $name =~ /::DESTROY$/; @@ -390,10 +389,9 @@ 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}}; - &$AUTOLOAD($self, @_); + *{$AUTOLOAD} = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}}; + goto &$AUTOLOAD; -# @_ ? $self->{$name} = shift : $self->{$name} ; } 1;