vishi83 has asked for the wisdom of the Perl Monks concerning the following question:

Suggest me some way to do this :


Create a Package with accessors / mutators generated with Class::MethodMaker and also support new, add, edit, delete, select (which would return an array of objects of the class type.). Add, Edit and delete would be object methods. All these using tables.

I can very well load my DBI module and use it.. But if I go for MethodMaker and how can I do that.. Can i use Class::DBI package for this. Suggest me the best option please


Thanks in advance Vishi

Replies are listed 'Best First'.
Re: Writing DB module using MethodMaker
by dragonchild (Archbishop) on Oct 20, 2005 at 12:55 UTC
    I would start by using Class::DBI and only roll your own when CDBI doesn't meet your needs.

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?