Re: [Catalyst] Alternatives to Catalyst ?
On Fri, Apr 23, 2010 at 5:51 PM, Kee Hinckley naz...@somewhere.com wrote: No argument there. I dearly wish the effort that had gone into Perl6 had gone into [blah blah]. You're subscribing to the fallacy that volunteer time is a resource you can allocate as you see fit. That's not how it works. chromatic has written at length about this subject, so I'm not going to delve further into it. -- Lars Balker RasmussenConsult::Perl ___ 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] Building complex layouts
On Wed, Dec 30, 2009 at 8:10 AM, Pavel O. Karoukin pa...@yepcorp.com wrote: Hello, I wonder what is a best practice to build complex layouts (sidebars, forms in 'em, list of latest news in sidebar, etc)? Right now I see it in chaining several actions and each one adding content into stash. Is there any other dry approaches? May be there is a way to separate each element of layout into it's own action + template and call this from base template? Definitely split sidebars etc. into separate actions. Then have nginx, varnish or equiv. combine them with SSI/ESI. This also helps caching across pages. -- Lars Balker RasmussenConsult::Perl ___ 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] Building complex layouts
On Wed, Dec 30, 2009 at 2:49 PM, Peter Corlett ab...@cabal.org.uk wrote: On 30 Dec 2009, at 10:11, Lars Balker Rasmussen wrote: [...] Definitely split sidebars etc. into separate actions. Then have nginx, varnish or equiv. combine them with SSI/ESI. This also helps caching across pages. Does Catalyst's built-in web server support either technology yet? If not, you're going to find it harder to debug your site if you use them. Meh, it'd be a trivial plugin to write, if nobody hasn't already. -- Lars Balker RasmussenConsult::Perl ___ 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] Why load modules two times?
On Tue, Aug 4, 2009 at 10:07 AM, Malloyjackwor...@gmail.com wrote: I find the modules were loaded two times? [info] myapp powered by Catalyst 5.7014 [Tue Aug 04 01:05:18 2009] [notice] Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations That's how mod_perl rolls. I think you'll find that the standalone server doesn't load the modules twice. http://perl.apache.org/docs/2.0/user/handlers/server.html Best way to avoid this: don't use mod_perl. -- Lars Balker RasmussenConsult::Perl ___ 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] Why load modules two times?
On Tue, Aug 4, 2009 at 11:20 AM, Malloyjackwor...@gmail.com wrote: But Apache2 has not ServerType option, how to set standalone? Standalone server = perl script/myapp_server.pl Check http://dev.catalystframework.org/wiki/deployment for alternatives to mod_perl. -- Lars Balker RasmussenConsult::Perl ___ 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] so many 'sleep' process in mysql.
On Sat, Apr 25, 2009 at 6:20 AM, Malloy jackwor...@gmail.com wrote: I use 'Catalyst::Model::DBIC::Schema'. But i find so many 'sleep' process in mysql. Is it normal? If not, why and how to avoid it? It's perfectly normal for a process to sleep when it doesn't have anything to do. It would be a problem if it didn't! -- Lars Balker RasmussenConsult::Perl ___ 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] [PATCH] Catalyst::DispatchType::Chained (5.7101, 5.80001)
On Mon, Apr 20, 2009 at 9:58 PM, Oleg Kostyuk cub.ua...@gmail.com wrote: I don't think that was what Matt asked for. Anyways, 1) Why can't your changes be a patch to Text::SimpleTable? I think that new module will be better in this case, because someone else can be needed unchanged Text::SimpleTable. May I suggest: my $t1 = Text::SimpleTable-new( 5, 10 ); my $t2 = Text::SimpleTable-new( [ 5, 'Foo' ], [ 10, 'Bar' ] ); my $t3 = Text::SimpleTable::AutoWidth-new( { max_width = 40, captions= [qw/Foo Bar Baz/], } ); Backwards compatible, easy to test for. -- Lars Balker RasmussenConsult::Perl ___ 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] [PATCH] Catalyst::DispatchType::Chained (5.7101, 5.80001)
On Mon, Apr 20, 2009 at 10:19 PM, Oleg Kostyuk cub.ua...@gmail.com wrote: 2009/4/20 Lars Balker Rasmussen l...@balker.dk: On Mon, Apr 20, 2009 at 9:58 PM, Oleg Kostyuk cub.ua...@gmail.com wrote: May I suggest: my $t1 = Text::SimpleTable-new( 5, 10 ); my $t2 = Text::SimpleTable-new( [ 5, 'Foo' ], [ 10, 'Bar' ] ); my $t3 = Text::SimpleTable::AutoWidth-new( { max_width = 40, captions = [qw/Foo Bar Baz/], } ); Backwards compatible, easy to test for. Not sure that understood what you mean here. Please, explain little bit more. Bah, cut'n'paste'n'user error: my $t3 = Text::SimpleTable-new( { max_width = 40, captions= [qw/Foo Bar Baz/], } ); I meant, it's easy to extend the Text::SimpleTable API without breaking backwards compatibility. -- Lars Balker RasmussenConsult::Perl ___ 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] stripping path parts and then redispatch?
On Sun, Feb 22, 2009 at 11:28 PM, Larry Leszczynski lar...@emailplus.org wrote: I have an existing site, and want to add the page language to the URLs so that caching will work correctly, e.g. /foo/bar would now look like /en/foo/bar or /fr/foo/bar. (The language is user-selected, not from browser prefs, so setting the Vary: Accept-Language response header won't help.) Apart from the missing true return value from auto, this works: http://lists.scsys.co.uk/pipermail/catalyst/2009-February/021072.html -- Lars Balker RasmussenConsult::Perl ___ 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::Plugin::Session::Store::CHI
On Tue, Feb 10, 2009 at 3:05 AM, Ashley a...@sedition.com wrote: Actually, replying to myself already; and top posting to boot. Alternatively: would it be a good idea to make the ::Store automatically discover the cache if it's there already? I might try a patch for that but I doubt it's as easy as a new store. I'd like it better though. There's always my slightly flawed Catalyst::Plugin::Session::Store::Cache? Flawed, since it doesn't update session-expiry on read. I expect to solve this for memcached when I get some tuits, maybe CHI supports something similar to memcached's cas? -- Lars Balker RasmussenConsult::Perl ___ 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] now() in insert
On Fri, Feb 6, 2009 at 5:40 PM, Devin Austin devin.aus...@gmail.com wrote: On Fri, Feb 6, 2009 at 4:45 AM, Christian Lackas christ...@lackas.net wrote: dt = \'now()' DateTime also has a -now method. Careful now, they may not be identical: % perl -MDateTime -E 'say DateTime-now' 2009-02-06T16:47:48 postgresql= select now(); now --- 2009-02-06 17:48:00.240287+01 No timezone in DateTime unless you explicitly ask for it. ___ 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] Detach won't detach?
On Mon, Jan 26, 2009 at 07:56:53PM +0100, koniczynek wrote: sub auto :Private { my ( $self, $c ) = @_; $c-log-debug('action start'); if ( ! user_logged_in) { $c-redirect( $c-req-base ); } else { $c-detach( $c-action-{name} ); } $c-log-debug('action end'); } auto relies on a return value to tell the dispatcher whether to continue or not. Doing the normal action is the default, detaching to it is redundant, hence: sub auto :Private { my ( $self, $c ) = @_; if ( ! user_logged_in) { $c-redirect( $c-req-base ); return 0; } return 1; } This example is pretty much exactly the same as in the main Catalyst pod. -- Lars Balker RasmussenConsult::Perl ___ 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] installing catalyst on mac os
On Wed, Dec 24, 2008 at 06:51:08AM -0500, Filippo A. Salustri wrote: Just FYI, I'm a catalyst beginner, but I wrote my first perl script in 1986. So you can use big words and I'll very likely get it. Wow. Larry released 1.000 in december 1987, so you must have worked with him at NASA. -- Lars Balker RasmussenConsult::Perl ___ 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] Any alternatives to generating thumbnails aside from Catalyst::Plugin::Upload::Image::Magick::Thumbnail
On Tue, Dec 23, 2008 at 07:49:50PM +1100, kakim...@tpg.com.au wrote: Yes i have heard of Imager. Anyone else used it extensively ? Extremely heavily for all image-related tasks for years. And remember the 1st rule of thumbnails: cache. -- Lars Balker RasmussenConsult::Perl ___ 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] OT: Use the CPAN, Luke? (was: Catalyst install failure due to Mouse.pm on Debian Etch)
On Thu, Nov 27, 2008 at 03:55:54AM +0100, Aristotle Pagaltzis wrote: Case in point, Mouse is essentially Moose Light. Since Catalyst itself is becoming Moose-based, is there *any* reason to use Mouse instead? I suppose if it automatically stubs itself into a Moose loader where Moose is available, that would be not *too* bad, but it???s still a pointlessly added dependency. While Data::Visitor depends on Mouse, it actually uses Squirrel (which is in the Mouse dist), which will fall back to the Moose already loaded by Catalyst. I assume most Mouse-users are smart enough to do this. And Data::Visitor isn't just for Catalyst-use, so our problem isn't theirs. -- Lars Balker RasmussenConsult::Perl ___ 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 Perl on Google App Engine
On Sun, Jun 29, 2008 at 01:47:02PM +0400, Oleg Pronin wrote: everything in other languages sucks compared to catalyst DBIC. What's your point? I asume Stephen is talking about running Cat+DBIC on app-engine (albeit a slightly neutered DBIC, but DBIC nevertheless). what is the goal to adapt more powerful system to less powerful? So, where is your hypothetical system that is more powerful than app-engine? Have you ever tried scaling an app beyond a single box? -- Lars Balker RasmussenConsult::Perl ___ 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] Distributed session storage problems/questions
On Wed, Feb 20, 2008 at 01:08:08PM -0500, Matt Pitts wrote: 1. What is the acceptable way to use memcached for session storage? Is it using C::P::Session::Store::Memcached or is it C::P::Session::Store::Cache in conjunction with C::P::Cache::Memcached? Well, either, really, they do much the same thing. I wrote CPS::Store::Cache to avoid the silliness of having two connections to memcached per backend, using two different Cache:: modules. So, if you have the cache working, it should be very easy to set up sessions. 2. Is memcached even a good way to store sessions? DBIC seems to be a popular option, but I figured memcached's considerable speed would make it the preferred choice. How important are sessions to you? If dropping a session once in a bluemoon is acceptable, memcached is perfectly fine. In fact, the memcached process is about as stable as the rest of the machine it runs on, which should hopefully be very stable. 3. When using memcached to store sessions, is it OK to have more than one backend? YES! Definitely. Silly not to. At first I didn't think anything about adding another backend, but then I thought that the 2 memcached instances wouldn't have the same set of data which would cause problems with sessions, unless of course the session writes get distributed to all the backends. I've looked into the source of C::P::Session::Store::Memcached, Cache::Memcached::Managed and Cache::Memcached and cannot tell if the writes are spread across all backends. Does anyone know the answer to this? As long as you specify the servers in the same order on all memcached- clients, they will hash the keys the exact same way, and a set() on server B will cause a get() on server A to just work(tm). 4. Is it just crazy to run a load balanced setup without some type of sticky session setup on the proxy? If so, any implementations of this using Apache 2.x mod_proxy(_balancer) as the frontend would be greatly appreciated. Sticky sessions are annoying. -- Lars Balker RasmussenConsult::Perl ___ 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] Status of Reaction - ready for new projects?
On Tue, Jan 01, 2008 at 03:00:57PM -0800, John Napiorkowski wrote: I remember reading somewhere about a Winter of Code perl project to use Reaction but I can't seem to find it, so I might have heard incorrectly. You haven't. http://www.shadowcat.co.uk/resources/woc_todo/ -- Lars Balker RasmussenConsult::Perl ___ 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] difficulty in assigning an array to a stash
On Sun, Nov 11, 2007 at 09:58:04PM +0530, jagdish eashwar wrote: Hi, I am trying to retrieve into an array a list of values from a column in a table using dbic and have it displayed in a drop down list in a tt2 template. I am able to do the retrieval part, but the tt2 template is displaying only the last value from the array. With further experimentation, I found that if I explicitly assign an array to a stash ( like '$c-stash-{myoptions} = [qw/1 2 3 4 5 6 7/];' ), I am getting all the 7 values in the tt2 template drop down. But if I define the array first and then assign it to the stash, ( like 'my @options = qw/1 2 3 4 5 6 7/; $c-stash-{myoptions} = @options;) I am getting only the last value in the tt2 template. How can I get all the values in the array into the stash without having to do it explicitly? $c-stash-{myoptions} = [EMAIL PROTECTED]; perldoc perlreftut -- Lars Balker RasmussenConsult::Perl ___ 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] Preventing Catalyst from loading a Controller pm module
On Tue, Oct 30, 2007 at 03:19:48PM +0200, Valentin Tumarkin wrote: Hi, I was wondering if there's a standard way for preventing Catalyst from loading a Controller module. I would like to keep my base Controller modules in the MyApp/Controller directory, but do not want Catalyst treating them as http-client accessible modules. For example: MyApp/Controller/BaseController.pm MyApp/Controller/AdvancedBaseControllerClass.pm (uses BaseController) MyApp/Controller/ActualController.pm (uses AdvancedBaseController) At this time I'm putting my base classes in the MyApp/Base/.. directories, but this method just doesn't seem as clean to me. This isn't clean(!) per se, but you could simply do sub auto { 0 } in the virtual bases and sub auto { 1 } in the real controllers. -- Lars Balker RasmussenConsult::Perl ___ 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/