Hi again, To clarify: app_create.pl correctly creates Species.pm when it encounters a table called species but is confused when it encounters any preceding string in the table name (e.g. plant_species) and attempts to singularise it (e.g. PlantSpecy.pm).
This is the command I use to create the model: perl script/app_create.pl model App DBIC::Schema \ App::Schema create=static dbi:mysql:app_db 'username' 'password' \ AutoCommit=1 \ moniker_map='{ plant_species => "PlantSpecies" }' \ components=EncodedColumn Is the syntax correct? Would 'inflect_plural' be a more suitable argument? If anyone could give some examples of how to use moniker_map/inflect_plural/another on the command line that would be really useful. Thanks very much, Matt. From: Lee [mailto:lee...@gmail.com] Sent: 04 May 2011 19:02 To: The elegant MVC web framework Subject: Re: [Catalyst] moniker_map arg in app_create.pl What plural should he use? On 04/05/2011 18:37, Hernan Lopes wrote: you should name your model singular, not plural On Wed, May 4, 2011 at 1:31 PM, matthew couchman (JIC) <matthew.couch...@bbsrc.ac.uk<mailto:matthew.couch...@bbsrc.ac.uk>> wrote: Hi, I have a table called plant_species which by default creates a schema result class PlantSpecy when I run my app_create.pl<http://app_create.pl> script. To get around this I've tried passing moniker_map='{ plant_species => "PlantSpecies" }' as an extra argument. It looks like the argument is read because it appears in lib/App/Model/App.pm but I still have a PlantSpecy.pm file rather than PlantSpecies.pm. Can anyone help? Thanks very much, Matt. _______________________________________________ List: Catalyst@lists.scsys.co.uk<mailto:Catalyst@lists.scsys.co.uk> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ _______________________________________________ List: Catalyst@lists.scsys.co.uk<mailto:Catalyst@lists.scsys.co.uk> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
_______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/