Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: AUTOLOAD - the good, the bad, and the ugly

by Fletch (Bishop)
on Oct 14, 2004 at 18:58 UTC ( [id://399294]=note: print w/replies, xml ) Need Help??


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');

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://399294]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-19 06:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found