Scarborough has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks
I have looked at AUTOLOAD on the perldocs and found thisIf an AUTOLOAD is found, this method is called on behalf of the missing method, setting the package global $AUTOLOAD to be the fully qualified name of the method that was intended to be called.
I've tried this
package mypackage; use strict; missingsub('a','b'); sub AUTOLOAD{ my $args = @_; #I'm getting these args. print $AUTOLOAD; #but this gives me a syntex error #Global symbol $AUTOLOAD requires explicit pac +kage name at.. }
Where am I going wrong.
UPDATE$AUTOLOAD is there I can see it in debug but I can only use it with strict off it seems20040910 Edit by broquaint: Changed title from 'AUTOLOAD not doing what I expected'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Global symbol $AUTOLOAD requires explicit package name at
by gellyfish (Monsignor) on Sep 09, 2004 at 14:07 UTC | |
|
Re: Global symbol $AUTOLOAD requires explicit package name at
by trammell (Priest) on Sep 09, 2004 at 14:18 UTC | |
|
Re: Global symbol $AUTOLOAD requires explicit package name at
by Prior Nacre V (Hermit) on Sep 09, 2004 at 14:35 UTC | |
|
Re: Global symbol $AUTOLOAD requires explicit package name at
by Scarborough (Hermit) on Sep 09, 2004 at 16:14 UTC |