in reply to AUTOLOAD - the good, the bad, and the ugly

Not exactly a direct answer to your question, but rather than using AUTOLOAD to handle accessors I tend to use Class::MethodMaker, which has the advantages of both declaring what the accessors are and not having to write the actual accessor code.

Update: Gah, cleaned up after premature posting due to hitting the wrong button.

  • Comment on Re: AUTOLOAD - the good, the bad, and the ugly

Replies are listed 'Best First'.
Re^2: AUTOLOAD - the good, the bad, and the ugly
by simonm (Vicar) on Oct 14, 2004 at 20:28 UTC
    Or consider Class::MakeMethods which gives you your choice of definition styles:
    # Explicit use Class::MakeMethods 'Standard::Hash::scalar' => [ qw/ method names / ]; # Autoload use Class::MakeMethods::Autoload 'Standard::Hash::scalar'; # Attributes use Class::MakeMethods::Attribute; sub name :MakeMethod('Standard::Hash::scalar');