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

Re^2: OO automatic accessor generation

by Neighbour (Friar)
on Nov 12, 2009 at 15:40 UTC ( #806748=note: print w/replies, xml ) Need Help??

in reply to Re: OO automatic accessor generation
in thread OO automatic accessor generation

You're right, after actually getting around to testing it with multiple instances, perl started to complain about sub redefinitions, so the constructor is not the best place to do this :)

I've now made a base class by shamelessly copying your code :P and made a Datatable class that inherits the base class and adds SQLquery-generating subs.

Unfortunately, it seems I will need to try both methods of OO-programming...the manual method to further my understanding of things, and using Moose to leave maintainable code for my colleagues :)

Also, right now the automatically generated accessors don't check anything about the data they are given. This is not how it is supposed to end up (at which point I will probably have to take them out of the autogenerated batch or try something like reassigning a new sub whenever the need arises) but just to get started.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2023-10-03 14:17 GMT
Find Nodes?
    Voting Booth?

    No recent polls found