[Dbix-class] DBIx::Class creating get_* and set_* methods

Steve Kirkup skirkup at jupiterimages.com
Fri Feb 8 05:33:37 GMT 2008


Hello,

I created a post on Perl Monks regarding this 
question(http://www.perlmonks.org/?node_id=666868) and someone referred 
to this mailing list.

This was my post verbatim,
-----------------------

I was looking to DBIx::Class 
<http://search.cpan.org/search?mode=module&query=DBIx%3A%3AClass> to 
work with my database. The one thing I would like to change is the 
accessor/mutators that it auto generates. Instead of the typical,

# Accessor method
$object->username;

# mutator method
$object->username('bob');

I want to methods that begin with 'get_' or 'set_' (depending on their 
functionality).

# Accessor method
$object->get_username;

# mutator method
$object->set_username('bob');

Has anyone done anything for this for DBIx::Class?

----------------
Sincerely,

Steve K




More information about the DBIx-Class mailing list