[Catalyst-dev] RFC: move scripts into modules
Matt S Trout
dbix-class at trout.me.uk
Sun Dec 17 14:18:01 GMT 2006
On 16 Dec 2006, at 09:08, Jonathan Rockway wrote:
> Something I've wanted to do for a while is to eliminate all code in
> the
> myapp_*.pl scripts, and change them to just "use
> Catalyst::Script::whatever".
> That way the user doesn't need to do anything to get updated scripts.
We should definitely be doing this; it's been something the old core
team members have wanted since before you turned up, and I'm sure you
and I have discussed it on #catalyst-dev a few times. I do keep
wondering if the best way to do this would be an Engine::CLI and
writing them in terms of that? (since we can be pretty damn sure -
Runtime's installed :)
The other thing that I think would really rock is to automatically
pick up MyApp::Script::Foo classes and use those instead of the stock
ones. Possibly we could look at adding something to ::Utils that
handles this (no I don't want to go the Jifty ClassLoader route,
that's gross :).
Might be worth doing that for dispatcher, req, res etc. as well then
we've got classes that can potentially be auto-vivified for req/res
plugins etc. (there's at least one plugin on CPAN where the author
direct-injects into Catalyst::Request because he didn't feel setting -
>request_class was robust enough ... sigh)
>
> I'd also like to switch to Getopt::Euclid, since it handles this
> situation
> better than the standard Getopt.
I'd rather not add a dependency unless you can expand that into a
justification for why this is the best new one to add, but I'm not
going to argue about the standard Getopt stuff sucking mightily :)
--
Matt S Trout, Technical Director, Shadowcat Systems Ltd.
Offering custom development, consultancy and support contracts for
Catalyst,
DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for
details.
+ Help us build a better perl ORM: http://dbix-
class.shadowcatsystems.co.uk/ +
More information about the Catalyst-dev
mailing list