On May 15, 2012, at 3:11 PM, <sc...@simpzoid.com> <sc...@simpzoid.com> wrote:
> I’d like to offer users their own database (so that their own data is 
> separate from other users) but use the same MVC code for all the user 
> databases. Following some helpful advice from this forum I have found the 
> documentation for ACCEPT_CONTEXT but unfortunately I don’t have the smarts to 
> understand the documentation, could someone please explain some things to me?


Forgive me if I've missed something but why not just write your model code and 
then reuse it by using it as a base class for each of your user databases?

So if your reusable model is  EasyAC::Model::DB then you would just reuse it by 
create another model that extends it:

package AnApp::Model::DB;
 
use Moose;
use namespace::autoclean;
BEGIN { extends 'EasyAC::Model::DB'; }

1;


Put the config information for that superclass in the config file for that 
application and you're all set.

There should be more information on how to do this in 
http://search.cpan.org/~zarquon/Catalyst-Manual-5.9004/lib/Catalyst/Manual/ExtendingCatalyst.pod

        - john romkey
        http://romkey.com/

_______________________________________________
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/

Reply via email to