Re: [Catalyst] New auth stuff and LDAP store...
On Fri, Oct 12, 2007 at 07:58:21AM -0500, Peter Karman wrote: On 09/24/2007 12:55 PM, Adam Jacob wrote: Anyone willing to give this a test run and let me know if things are working correctly for them? I don't have any apps using the new interface. :) Adam Having not heard any feedback on this to the list, I'm wondering if there is a way anyone knows of writing portable tests with a mock LDAP server. I'd be happy to write such a test if there were a way to do it. Net::LDAP appears to start a temporary openldap instance. See t/common.pl in the dist. My personal thought would be to compile my own tinyldap as part of my test build process. There's also a Net::LDAP::Server on CPAN which may or may not be any use. -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Directorhttp://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/http://www.shadowcat.co.uk/servers/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] uri_for and Chained actions
I have a hundred of img src= and a hundred of a href=.. per page on 1-2mln hosts/day project. If your project is not under subfolder of some domain then there is no need to call img src=[%c.uri_for('/images/img.jpg')%]/ instead of img src=/images/img.jpg/ as they are both pointing to the same place. 2007/10/12, Matt S Trout [EMAIL PROTECTED]: On Thu, Oct 11, 2007 at 02:51:31AM +0400, Oleg Pronin wrote: If your project is heavy loaded then i think the best way is to write: form action=/myapp/[%object.id%]/update or (easy to change): form action=[%object.update_url%] in Object: sub update_url {'/myapp/'.shift-id.'/update} because Catalyst.uri_for() still takes to much CPU to call it a hundred times per page. It's a -lot- faster in the latest release. Are you sure this is still the bottleneck you think it is? -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Director http://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Catalyst::Plugin::Prototype
Stefan Kühn wrote: The documentation of Catalyst::Plugin::Prototype is a rather thin. Only one example of a method is given: [% c.prototype.observe_field( 'editor', uri, { 'update' = 'view' } ) %] Is it correct that Catalyst::Plugin::Prototype uses and that the methods can be determined from perldoc Catalyst::Plugin::Prototype ? Or how can i find it's methods? Stefan Dont use this plugin. It is one of the more stupid plugins. The entirety of the code is this: package Catalyst::Plugin::Prototype; use strict; use base 'Class::Data::Inheritable'; use HTML::Prototype; our $VERSION = '1.33'; __PACKAGE__-mk_classdata('prototype'); eval { require HTML::Prototype::Useful; }; if ( $@ ) { __PACKAGE__-prototype( HTML::Prototype-new ); } else { __PACKAGE__-prototype( HTML::Prototype::Useful-new ); } Just create a HTML::Prototype yourself and be done with it if you want to use Prototype. -ash ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Limiting flash to a specific request
On Fri, Oct 12, 2007 at 12:42:10PM -0500, Dave Rolsky wrote: I'm doing something very similar, except I just the session itself, and it's my _only_ use of sessions. In my case, I just put the session id in the URI. Sessions never contain sensitive info, and they expire after 5 minutes, so I'm not too worried about the security issue. No cookie to store a global session id? That is, your session id is page specific? (Is there a term for the path that a page follows? Web Thread? ;) ) The main reason I did things the way I did was to aim for a RESTful interface. My URIs always represent something specific (login form or login form plus session X) and repeatable. For other things I might've previously stuck in a session (like searches, paging, etc) I just stick it in the URI, again to be RESTful. This also has the bonus that users will be able to bookmark searches and such easily, which is nice. One feature I'm toying with is the undo action (as discussed July 25) so that after a POST and update and then a redirect I get a message Record updated - undo. So that message must be shown to the correct browser window, plus the link to the undo action has to reference a specific undo operation. Two windows could have concurrent pending undo actions. I'm not thrilled about the undo feature as some future actions may make previous stored undo actions not possible. I'm planning to write up how I did this and post it on my use Perl journal at some point. It's nothing revolutionary, but it might be of interest to others. Yes, I'm sure it would be. Thanks, -- Bill Moseley [EMAIL PROTECTED] ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] connecting to a remote sqlite
Hello, I connect to a local sqlite db. The data is being retrieved roughly like this: my $rs = $c-model('MyAppDB::Table1')-search( undef, { prefetch={ 'rel1'={'rel2'=['table4','table5'] } }, select=['me,id','me.pd'], as=[qw/id pd/], }, ); while (my $row = $rs-next) { } That's ok. But If I try to connect remotely through DBD::Proxy, the Catalyst application emits the following error: DBIx::Class::ResultSet::next(): DBI Exception: DBD::Proxy::db ping failed: Unexpected EOF while waiting for server reply at /usr/local/lib/perl5/site_perl/5.8.8/RPC/PlClient.pm line 110. Without prefetch, there is no error. Is it possible (and which way) to retrieve data from a remote db via proxy with Catalyst? Thanks. -- Radek ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/