Re: [Catalyst] question about retrieving all current Controllers
On Sun, Jul 15, 2007 at 10:59:29PM -0600, Devin Austin wrote: Hi all, I'm trying to figure out how to list all of my controllers on a page like the development server does when it starts up. Is there any way to do this or do I have to code something myself? perldoc Catalyst look for the 'controllers' method. -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical DirectorWant a managed development or deployment platform? Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[catalyst] conditional loading of Controllers and Models
is there a way to have some C's and M's load into catalyst conditionally? for example, if some config variable is set? cheers D ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [catalyst] conditional loading of Controllers and Models
On Mon, Jul 16, 2007 at 02:48:50PM +0200, Daniel McBrearty wrote: is there a way to have some C's and M's load into catalyst conditionally? for example, if some config variable is set? Exclude some of them with setup_components config. Or just do it via @INC manipulation - I use this a fair bit for testing. Depends what you're trying to achieve really, and you haven't told us :) -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical DirectorWant a managed development or deployment platform? Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [catalyst] conditional loading of Controllers and Models
ok, I'll spill ... ! I'll run one version of the site in translate mode - the members there are actually translators, they login and ... translate. Hence there is a model/controller that has all that stuff Of course I could just leave it in for the prod site, but I'd rather just have those components not load at all ... On 7/16/07, Matt S Trout [EMAIL PROTECTED] wrote: On Mon, Jul 16, 2007 at 02:48:50PM +0200, Daniel McBrearty wrote: is there a way to have some C's and M's load into catalyst conditionally? for example, if some config variable is set? Exclude some of them with setup_components config. Or just do it via @INC manipulation - I use this a fair bit for testing. Depends what you're trying to achieve really, and you haven't told us :) -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical DirectorWant a managed development or deployment platform? Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Session trouble
Hi, no update yet, been terribly busy (the client is not being very nice to us). If you need comaint to release yourself let me know. You should have commit access, right? The upload from today was to fix the test that needs Cookie. -- Yuval Kogman [EMAIL PROTECTED] http://nothingmuch.woobling.org 0xEBD27418 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [catalyst] conditional loading of Controllers and Models
I use: package MyApp; use Catalyst qw/ ... /; my @extra_plugins; if( $ENV{CATALYST_DEBUG} ) { push @extra_plugins = qw/ Static::Simple StackTrace /; } # Start the application __PACKAGE__-setup( @extra_plugins ); Mark On Monday 16 July 2007 1:48 pm, Daniel McBrearty wrote: is there a way to have some C's and M's load into catalyst conditionally? for example, if some config variable is set? cheers D ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Session trouble
On Mon, Jul 16, 2007 at 07:20:36PM +0300, Yuval Kogman wrote: Hi, no update yet, been terribly busy (the client is not being very nice to us). If you need comaint to release yourself let me know. You should have commit access, right? I can take another stab at it -- I had spent a few hours throwing warn and cluck messages into the code to try and figure out what was going on. My eyes started to glaze over after a while. I like how you refactored the plugins quite a bit. But, I wish there were comments in the code to give a little context. That would make debugging by people unfamiliar with the code easier. I also find NEXT makes it a bit more complicated when trying to follow stack traces. Would you have a few minutes to at least verify if you can reproduce the problem with the test application I sent? I'd like to rule out any thing that might be due to my environment. What seems to be happening (and this was happening with a previous bit of code from a week or two back) was that I was accessing the session after it had been cleared/reset at the end of finalize (or something like that). So, that was creating a new sessionid and thus storing the session data under a different id than the id used in the cookie. This is the code that's getting me now: sub calculate_session_cookie_expires { my $c = shift; return $c-session-{remember_me} ? $c-session_expires : $c-NEXT::calculate_session_cookie_expires; } I think the quick fix would be to stuff the remember_me flag in the stash earlier in the request and look at the stash instead of the session (to avoid creating a new sessionid by calling $c-session). I thought it might be a matter or moving $c-_clear_session_instance_data later in the request cycle, but it seems that's not really the problem. I was seeing multiple sessions created (and cleared) in the case of a request with a cookie with an id for an expired session -- which doesn't seem right. Oh, and to note again: I think the behavior of dieing on invalid session id format is not right. The id should just be ignored in that case and a new cookie sent. If someone ends up with a bad cookie (or the cookie format changes) could result in a lockout. Thanks, -- Bill Moseley [EMAIL PROTECTED] ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] new C::P::A::LDAP for new-style C::P::A
As suggested in http://search.cpan.org/~jayk/Catalyst-Plugin-Authentication-0.1/lib/Catalyst/Plugin/Authentication.pm (_don't see also_ section), has this new version of C::P::A::LDAP already made it to CPAN and obsoleted C::P::A::Store::LDAP, or is anyone using the new C::P::A (0.1000) with C::P::A::Store::LDAP (0.04)? After upgrading C::P::A, the app fails miserably, and the version at http://64.200.109.9/LDAP.tar.gz doesn't seem to work either. In my case, the following error appears when trying to load dev server (and even running the t/01.app included): Can't use string (MyApp) as a HASH ref while strict refs in use at /usr/local/share/perl/5.8.8/Class/Accessor/Fast.pm line 38 Even after changing the configuration as suggested by C::P::A and the POD included in http://64.200.109.9/LDAP.tar.gz (e.g. realms with user, credential and store classes). Any help appreciated, and thanks again! ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] new C::P::A::LDAP for new-style C::P::A
On Jul 16, 2007, at 1:35 PM, Juan Miguel Paredes wrote: As suggested in http://search.cpan.org/~jayk/Catalyst-Plugin-Authentication-0.1/ lib/Catalyst/Plugin/Authentication.pm (_don't see also_ section), has this new version of C::P::A::LDAP already made it to CPAN and obsoleted C::P::A::Store::LDAP, or is anyone using the new C::P::A (0.1000) with C::P::A::Store::LDAP (0.04)? After upgrading C::P::A, the app fails miserably, and the version at http://64.200.109.9/LDAP.tar.gz doesn't seem to work either. In my case, the following error appears when trying to load dev server (and even running the t/01.app included): Can't use string (MyApp) as a HASH ref while strict refs in use at /usr/local/share/perl/5.8.8/Class/Accessor/Fast.pm line 38 Even after changing the configuration as suggested by C::P::A and the POD included in http://64.200.109.9/LDAP.tar.gz (e.g. realms with user, credential and store classes). Any help appreciated, and thanks again! I haven't had a chance to test the C::P::A::Store::LDAP code with the new C::P::A. If you want to patch the current C::P::A::S::LDAP, I'll happily accept (and test) the changes. Adam -- HJK Solutions - We Launch Startups - http://www.hjksolutions.com Adam Jacob, Senior Partner T: (206) 508-4759 E: [EMAIL PROTECTED] ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] calling detach within begin
I can't seem to get a detach call within my application's Root begin to work. While it does seem to stop processing with the begin method, Catalyst continues processing whatever action was specified by the request. I've looked through the docs and it seems like I might need to use auto()? The auto action is also distinguished by the fact that you can break out of the processing chain by returning 0. If an auto action returns 0, any remaining actions will be skipped, except for end. Should I create an auto() action and forward to the action I was previously detaching to, and return 0? -- Jim Spath ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: RFC Catalyst::Plugin::ErrorOut
* apv [EMAIL PROTECTED] [2007-07-14 01:35]: Name preference if it's ending up on the CPAN? “ErrorOut” is pretty non-descript. I didn’t have any idea what it was supposed to do until I read your description. Along the lines of your name it would have to be something with “bail out” rather than “error out”, I’d say. But I’d rather call it FatalErrorThrow and the method would be `fatal_error`, I think. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] calling detach within begin
Jim Spath wrote: I can't seem to get a detach call within my application's Root begin to work. While it does seem to stop processing with the begin method, Catalyst continues processing whatever action was specified by the request. I've looked through the docs and it seems like I might need to use auto()? The auto action is also distinguished by the fact that you can break out of the processing chain by returning 0. If an auto action returns 0, any remaining actions will be skipped, except for end. Should I create an auto() action and forward to the action I was previously detaching to, and return 0? I've gone ahead and started returning auto and it appears to work. It might be nice to make a note in the docs somewhere that calling detach in begin might not do what you expect and that returning 0 from auto is what you should be doing. -- Jim Spath ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [catalyst] conditional loading of Controllers and Models
On Jul 16, 2007, at 8:48 AM, Daniel McBrearty wrote: is there a way to have some C's and M's load into catalyst conditionally? for example, if some config variable is set? You can call load_classes() and pass something other than the default values. At one point for some reason I wanted to load only the modules at the top of my Schema directory, and not include anything in subfolders, so I did this: throws ::Error::Unexpected; # Only get the first level items, I don't want sub folders. use Module::Find; __PACKAGE__-load_classes(map { substr $_, length(__PACKAGE__ . '::') } findsubmod(__PACKAGE__)); ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/