Re: [Catalyst] Log::Log4perl::Catalyst or Catalyst::Log::Log4perl ?

2010-06-14 Thread Peter Corlett
On Sun, Jun 13, 2010 at 11:14:44AM +0200, Christiaan Kras wrote:
[...]
 I've found and tried Catalyst::Plugin::Log4perl::Simple but when using the
 module Catalyst warns about it using NEXT. So I'm wondering if it's smart
 to use it in its current state.

That's one of my modules, a very crude hack to scratch one of my itches.
Although it gives a warning, it does work. It didn't give a warning when I
wrote it, but CPAN has marched on.

Since the warning's annoying me, I'll probably fix it over the next week or
so.


___
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

2009-12-30 Thread Peter Corlett

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.




___
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 - any good AJAX tutes?

2009-03-06 Thread Peter Corlett

On 6 Mar 2009, at 10:33, Neo [GC] wrote:
[...]
To anyone: Be careful when converting perl-datastructures to JSON. I  
remember having a problem with boolean values, as javascript knows  
real booleans while perl uses 0 and 1. use JSON did have some  
magic settings to prevent a boolean 0/false to be sent as string  
false, which is interpreted as boolean true in javascript.
I will ask my collegue, where he has hidden his solution / the cause  
of the problem (of course, if int 0 and 1 is sent, js casts int 0 to  
boolean false).


I solved that problem in one of my projects by explicitly putting  
JSON:: constants into the data structure like so:


$c-stash-{myjsonresponse} = {
 boolean = $myboolean ? JSON::true : JSON::false,
}



___
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] How to detect cancelled requests?

2008-10-29 Thread Peter Corlett
On Wed, Oct 29, 2008 at 10:11:35AM -0400, Stuart Watt wrote:
[...]
 To give context, the queries that are an issue are SQL queries against a
 database that contains millions of components, where users may construct
 wildcard queries of the form *A*, with additional filtering constraints.

If that was a reasonably popular query, I would certainly consider building
a table which contains substrings of that field, so that it becomes a much
more optimisable LIKE 'A%' query.


___
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] C::P::Compress::Gzip

2008-09-24 Thread Peter Corlett
On Sat, Sep 20, 2008 at 11:46:25AM +0300, Octavian Rasnita wrote:
 I try to use C::P::Compress::Gzip, but if I add it to the list of plugins,
 the program gives an error in the browser telling The requested URL / was
 not found on this server.

It's probably easier to just configure Apache to do the compression for you.
That way the static content not processed by Catalyst will also be
compressed.

I just stick SetOutputFilter DEFLATE inside the VirtualHost  In
theory, you ought to also put it inside a FileMatch ... to exclude
already-compressed files, but I don't bother.


___
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, what do we want in the -next- book?

2008-04-29 Thread Peter Corlett
On Sun, Apr 27, 2008 at 03:01:47AM -0500, Jonathan Rockway wrote:
[...]
 Anyway, I hate to break this to you... if you want to know every detail of
 how the code works, you have to read the code. Reading code is the most
 important skill a programmer can have, so I suggest biting the bullet,
 opening up your favorite code browser (ECB++), and perusing.

Right, and I need to read the entire Linux and libc source code to be able
to write a Unix application.


___
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, what do we want in the -next- book?

2008-04-29 Thread Peter Corlett
On Tue, Apr 29, 2008 at 11:34:57AM -0500, Jonathan Rockway wrote:
 * On Tue, Apr 29 2008, Peter Corlett wrote:
[...]
 Right, and I need to read the entire Linux and libc source code to be
 able to write a Unix application.
 It will help, yes.

It may well help, but it is not necessarily the best approach. The source
code to a library is too low-level for a user of the library to really get a
grip on how all the pieces fit together and are intended to be used.

Telling people to grub through the source is generally an admission that the
doucmentation sucks. Which it does.


___
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/