On Fri, Apr 27, 2007 at 01:53:00PM +0100, Lee Goddard wrote:
> From: Marcello Romani [mailto:[EMAIL PROTECTED]
>
> > Lee Goddard ha scritto:
> > > Is there a variable somewhere that can tell me when Catalyst's
> > > dev-server is starting up? Because it seems to be calling every
> method
> > > I've written, but without parameters, which intentionally causes
> errors
> > > when in production, but shouldn't during automated tests.
> > >
> > > Thanks in anticipation
> >
> > Can you be more specific ?
> >
> > What do you mean by 'calling every method I've written ?'
>
> Sorry: I meant when the server starts, it seems to attempt to call 'new'
> for every *.pm in MyApp::Model::* :
>
> Couldn't instantiate component "CTT::Model::SWF"
That's supposed to happen. Try making sure the tests can find a config file
(see Plugin::ConfigLoader docs for what env var to set for this) that provides
a suitable set of config info for them to be instantiated with.
If you don't want the ::Model::* object instantiated, don't inherit from
Catalyst::Model.
Oh, and next time you ask the list for help, please explain the -actual-
problem and the behaviour you're seeing rather than asking for help with
your half-assed hack around it, you'll get better answers faster (nothing
personal, this mistake is so common it's got its own name - "XY problem" :)
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://www.shadowcatsystems.co.uk/
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/