Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: using the Class::* Modules

by stephen (Priest)
on Apr 22, 2001 at 11:09 UTC ( #74549=note: print w/replies, xml ) Need Help??

in reply to using the Class::* Modules

I'll assume that you're talking about Class::MethodMaker. MethodMaker defines its methods on-the-fly when the class loads. When you ask "where do they put the accessors?", do you mean "where is the accessor implementation written out to a file?"? If that's what you mean, the accessor implementation isn't written out to a file-- it's just evaluated at compile-time.

To modify these methods, you just need to define your own. To quote from the perldoc:

To override any generated methods, it is sufficient to ensure that the overriding method is defined when Class::MethodMaker is called. Note that the use keyword introduces a BEGIN block, so you may need to define (or at least declare) your overriding method in a BEGIN block.


Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2023-12-09 18:32 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (38 votes). Check out past polls.