Re: [Catalyst] Log::Dispatch plugin is not working when run in the background
On 3 Mar 2012, at 22:01, Robert Rothenberg wrote: On 02/03/12 20:29 Tomas Doran wrote: It's a Catalyst issue. A fix on the plugin, or Catalyst? It's a fix in Catalyst itself :) Cheers t0m ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Connect DBIx::Class model on startup?
On 2 Mar 2012, at 20:44, Daniel J. Luke wrote: On Feb 25, 2012, at 10:00 AM, Daniel J. Luke wrote: On Feb 25, 2012, at 3:39 AM, Tomas Doran wrote: Or maybe there's a reason why there's not an obvious hook and someone can point me to the pitfalls I'm not seeing. It's not totally obvious as you can't do this at process startup (as you then fork!), Yeah, I just realized that that was going to be an issue when I went to attempt this (late yesterday). so it has to be done in the FCGI process manager really (which does the forking)… You can subclass FCGI::ProcManager and implement: sub handling_init { my $self = shift; $self-next::method(@_); MyApp-model('DB')-schema-dbh-ping; # Check we have a DB connection that's working straight after forking but before starting to handle requests. Maybe I'm being thick, but where does that instance of MyApp come from? I don't see it being passed into FCGI::ProcManager What instance of MyApp? There is no instance? Cheers t0m ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
RE: [Catalyst] Resources to learn catalyst
The best resource out there is the Tutorial. I would recommend that you spend some time on Moose and Template Toolkit before getting serious with the Tutorial, and also you definitely need to understand the material in the OReilly Intermediate Perl book. The biggest drawback to the Tutorial is that it is more about DBIx::Class than Catalyst, the only DBI Models for beginners documentation I know of is what I put on my own technical blog (http://brainbuz.org/techinfo/Catalyst-Model-Simple-Tutorial.html). If you're learning programming you should learn DBI/SQL before coming to terms with any ORM. From: Chankey Pathak [mailto:chankey...@gmail.com] Sent: Thursday, March 01, 2012 12:28 PM To: catalyst@lists.scsys.co.uk Subject: [Catalyst] Resources to learn catalyst I am new to catalyst. I know Perl at beginner level (finished reading Learning Perl). I am following the catalyst tutorial at CPAN. Let me know some more resources to learn catalyst. Thanks :) -- Regards, Chankey Pathak ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Resources to learn catalyst
Okay, thanks :) On Mon, Mar 5, 2012 at 1:55 AM, John Karr brain...@brainbuz.org wrote: The best resource out there is the Tutorial. I would recommend that you spend some time on Moose and Template Toolkit before getting serious with the Tutorial, and also you definitely need to understand the material in the O’Reilly Intermediate Perl book. The biggest drawback to the Tutorial is that it is more about DBIx::Class than Catalyst, the only DBI Models for beginners documentation I know of is what I put on my own technical blog (http://brainbuz.org/techinfo/Catalyst-Model-Simple-Tutorial.html). If you're learning programming you should learn DBI/SQL before coming to terms with any ORM. From: Chankey Pathak [mailto:chankey...@gmail.com] Sent: Thursday, March 01, 2012 12:28 PM To: catalyst@lists.scsys.co.uk Subject: [Catalyst] Resources to learn catalyst I am new to catalyst. I know Perl at beginner level (finished reading Learning Perl). I am following the catalyst tutorial at CPAN. Let me know some more resources to learn catalyst. Thanks :) -- Regards, Chankey Pathak ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ -- Regards, Chankey Pathak http://javaenthusiastic.blogspot.com ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Connect DBIx::Class model on startup?
On Mar 4, 2012, at 9:56 AM, Tomas Doran wrote: On 2 Mar 2012, at 20:44, Daniel J. Luke wrote: On Feb 25, 2012, at 10:00 AM, Daniel J. Luke wrote: On Feb 25, 2012, at 3:39 AM, Tomas Doran wrote: Or maybe there's a reason why there's not an obvious hook and someone can point me to the pitfalls I'm not seeing. It's not totally obvious as you can't do this at process startup (as you then fork!), Yeah, I just realized that that was going to be an issue when I went to attempt this (late yesterday). so it has to be done in the FCGI process manager really (which does the forking)… You can subclass FCGI::ProcManager and implement: sub handling_init { my $self = shift; $self-next::method(@_); MyApp-model('DB')-schema-dbh-ping; # Check we have a DB connection that's working straight after forking but before starting to handle requests. Maybe I'm being thick, but where does that instance of MyApp come from? I don't see it being passed into FCGI::ProcManager What instance of MyApp? the one that I'm going to call -model() on in order to pre-connect to my DB? There is no instance? Then there's some magic that I'm missing? If I take your code literally, I'm going to get a 'cannot use a string as a hash ref' error. -- Daniel J. Luke ++ | * dl...@geeklair.net * | | *-- http://www.geeklair.net -* | ++ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | ++ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Catalyst and LDAP with sessions
Birger Burkhardt wrote on 2/28/12 7:48 AM: Hi Francisco, i am not quite sure, if it could be done using existing classes/modules. Can you please have a look at the following both links. Are you sure, i have to implement the storage of the passwod in a memcached server? http://cpansearch.perl.org/src/BOBTFISH/Catalyst-Model-LDAP-FromAuthentication-0.02/README According to this changelog (see entry in Version 1.007): http://cpan.uwinnipeg.ca/htdocs/Catalyst-Authentication-Store-LDAP/Changes.html the user object has to be serialized and stored in the session to be used for further connects to the LDAP server. No need to store the user credentials or object separately, unless you have other needs (as Birger seems to). The fix in 1.007 mentioned here: https://rt.cpan.org/Ticket/Display.html?id=53279#txn-734373 was for the case where the User object was being stored in the session. That isn't done by default (as I mentioned earlier in this thread). Birger, it seems like your use case is a little different than what the LDAP authn module assumes. You don't just want to do initial authn and then create a Catalyst-specific session/cookie; that's what the module does. Instead you seem to want to re-bind at every HTTP request as the logged-in user, in order to perform subsequent LDAP actions that go beyond simple authentication. You can do that with the LDAP authn module, but that isn't its original intent. I'd suggest explicitly storing the user's credentials in the session on initial login, and 2-way encrypting the password so that you can decrypt it out each time you need to bind to your LDAP server (maybe in an auto() method in your affected controller(s)). I use Crypt::CBC for that in my apps (mostly because I am able to use the same algorithm from both PHP and Perl), but I am sure there are other 2-way encryption modules that would work just as well. -- Peter Karman . http://peknet.com/ . pe...@peknet.com ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Connect DBIx::Class model on startup?
On Sun, Mar 4, 2012 at 8:30 PM, Daniel J. Luke dl...@geeklair.net wrote: MyApp-model('DB')-schema-dbh-ping; # Check we have a DB connection that's working straight after forking but before starting to handle requests. Maybe I'm being thick, but where does that instance of MyApp come from? I don't see it being passed into FCGI::ProcManager What instance of MyApp? MyApp-method() is a direct reference to the original package, not to an instance. my $myapp = MyApp-instantiate() would be an instance, if you had such a method to call. use MyApp; MyApp-something(); MyApp has been included as a library, so now you can call it appropriately. There's *no instance* in this case... the one that I'm going to call -model() on in order to pre-connect to my DB? There is no instance? Then there's some magic that I'm missing? If I take your code literally, I'm going to get a 'cannot use a string as a hash ref' error. -- Daniel J. Luke ++ | * dl...@geeklair.net * | | *-- http://www.geeklair.net -* | ++ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | ++ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ -- We act as though comfort and luxury were the chief requirements of life, when all that we need to make us happy is something to be enthusiastic about. -- Albert Einstein ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] (no subject) - XML-Views: Using XML-Simple ...
Hi there, first of all: sorry for using no topic on my initial mail - I changed this now ... On 28 Feb 2012, at 13:03, Johannes Kilian wrote: Hi, I've got following question concerning views: I want to provide an XML-View which provides standard XML-Files using XML::Simple in almost any case. Just in some cases I want to provide specialized XML-Files. On 29 Feb 2012, at 1:32, Thomas Doran wrote: Erm, why are you not just sending your already rendered standard XML file? Within my controller in most cases the XML-structure generated by XML::Simple is sufficent. But certain URL should give a predefined XML-structure which I cannot achieve via XML::Simple ... My controller renders a few data structures - depending on the URL. With certain URL's I want a clearly defined XML-Structure - in other cases where I don't want/need to have a generic XML Structure the XML::Simple Output is sufficent ... On 28 Feb 2012, at 21:25, Kieren Diment wrote: I'd either use Catalyst::View;:Download::XML, or steal from it to create your own view: https://metacpan.org/module/Catalyst::View::Download::XML I'll have to look into this ... On 29 Feb 2012, at 11:35, Will Crawford wrote: $c-stash(current_view = '...'); Then override that either in an individual action or part of a chain ... ... and into this as well! Johannes -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/