Re: [Catalyst] Sub-classing Application

2010-01-04 Thread Bill Moseley
On Sun, Dec 20, 2009 at 3:05 PM, Matthias Dietrich mdietr...@cpan.orgwrote: Hi, I'd like to catch up this slightly old topic... I've build a small app for a customer and want to pull out some sections to build a small CMS I can use in several upcoming apps. I don't want to copy-paste

Re: [Catalyst] Sub-classing Application

2009-12-20 Thread Matthias Dietrich
Hi, I'd like to catch up this slightly old topic... I've build a small app for a customer and want to pull out some sections to build a small CMS I can use in several upcoming apps. I don't want to copy-paste everything everytime an app comes up or update all instances. So it would be very

[Catalyst] Sub-classing Application

2009-12-16 Thread Bill Moseley
I have an existing application Foo. I'd like to create a new application Bar that has very similar actions. What I'm wondering is if there's a way where I could run catalyst.pl Bar to create a new empty application and then tell it to inherit from Foo. That is load_components would load all of

Re: [Catalyst] Sub-classing Application

2009-12-16 Thread Bill Moseley
On Wed, Dec 16, 2009 at 8:31 AM, J. Shirley jshir...@gmail.com wrote: The documentation seems quite sparse, but if you look at the source it just essentially does: my $locator = Module::Pluggable::Object-new( search_path = [ map { s/^(?=::)/$class/; $_; } @paths ],

Re: [Catalyst] Sub-classing Application

2009-12-16 Thread J. Shirley
On Wed, Dec 16, 2009 at 9:27 AM, Bill Moseley mose...@hank.org wrote: On Wed, Dec 16, 2009 at 8:31 AM, J. Shirley jshir...@gmail.com wrote: The documentation seems quite sparse, but if you look at the source it just essentially does:    my $locator = Module::Pluggable::Object-new(        

Re: [Catalyst] Sub-classing Application

2009-12-16 Thread Bill Moseley
On Wed, Dec 16, 2009 at 9:59 AM, J. Shirley jshir...@gmail.com wrote: It seems you're after something that would best be accomplished using roles that get composed into the controller. Ah, of course. I think that's a good idea. I rewrote a bunch of plugins and other code using Roles and

Re: [Catalyst] Sub-classing Application

2009-12-16 Thread Tomas Doran
On 16 Dec 2009, at 17:27, Bill Moseley wrote: It also means I can't easly overide. If I have hello() in both thes controllers: Foo::Controller::Whatever::hello() Bar::Controller::Whatever::hello() I then get: [debug] Loaded Path actions: .-