Re: [Catalyst] call of the dbd disconnect method via catalyst model

2009-11-23 Thread Tomas Doran
christian4catal...@lists.muthpartners.de wrote: Can me someone say, where i can, who i can close the dbd-connection in line 09, so that line 10 reopen the connection. 01 sub foo 02 { 03 my ( $self, $c ) = @_; 04 my $model = $c-model('DB::TABLE') ; 05 my

[Catalyst] Unicode trouble with Catalyst::Engine::FastCGI

2009-11-23 Thread Bernhard Graf
After I recently re-installed my Development-Perl (that one, that I use apart from the production Perl installation), all pages that went through Catalyst::Engine::FastCGI got double-utf8-encoded. When using the standalone HTTP server, everything is fine. Both installations used Perl 5.10.1. I

[Catalyst] consuming Webservices with Catalyst?

2009-11-23 Thread Jens Schwarz
Hi, I want to change my Catalyst app so that its data is not written/read to/from my MySQL-DB but to/from Webservices. I have made a simple test (outside of Catalyst) with SOAP::WSDL that works for reading a Webservice. This looks like this: use MyInterfaces::FooService::FooPortType; my

Re: [Catalyst] Avoiding UTF8 in Catalyst

2009-11-23 Thread Bill Moseley
On Mon, Nov 23, 2009 at 2:01 AM, Marc SCHAEFER schae...@alphanet.ch wrote: On Sat, Nov 21, 2009 at 05:16:24PM -0800, Bill Moseley wrote: Apparently all diacritic characters are expanded into HTML entities. Where does that happen? It looks like it's TT::View's htmlentity which does this, not

Re: [Catalyst] Re: Avoiding UTF8 in Catalyst

2009-11-23 Thread Carl Johnstone
Aristotle Pagaltzis wrote: But there’s no room for “likelies” here: that’s programming by coincidence. The likely was correct. When using UTF-8 whether the length of the string is different in bytes and characters depends entirely on what the contents of the string are. Given a particular

Re: [Catalyst] Re: Avoiding UTF8 in Catalyst

2009-11-23 Thread J. Shirley
On Mon, Nov 23, 2009 at 8:34 AM, Aristotle Pagaltzis pagalt...@gmx.dewrote: [huge snip] Aristotle++ This was a fantastic explanation with examples. Even though I *think* I understand the unicode issues in perl, I still can find myself getting confused. These examples just help that.

[Catalyst] Re: Avoiding UTF8 in Catalyst

2009-11-23 Thread Aristotle Pagaltzis
* Carl Johnstone catal...@fadetoblack.me.uk [2009-11-23 18:50]: Aristotle Pagaltzis wrote: Please plese don’t make statements like “not in this case” without knowing what the thing you are talking about does, i.e. in this case bytes::length, does. There are enough misconceptions about

[Catalyst] How to reduce the memory footprint?

2009-11-23 Thread Julien Sobrier
Hello, I have quite a small Catalyst application that runs with FastCGI + FCGI::ProcManager::MaxRequests I run 5 instances of FastCGI. Each instance was taking about 90MB of memory. I tried to reduce the memory fooprint by reducing the number of libraries I used. The memory usage is now 120MB per

[Catalyst] Re: Unicode trouble with Catalyst::Engine::FastCGI

2009-11-23 Thread Aristotle Pagaltzis
* Bernhard Graf cataly...@augensalat.de [2009-11-23 19:10]: Meanwhile I realized, that the final output buffer (header + body) actually /has/ the UTF-8 flag set. So it seems, that Jonathan's idea (above link) also matches my case. Everything seems fine again, when I insert this line

Re: [Catalyst] Re: Unicode trouble with Catalyst::Engine::FastCGI

2009-11-23 Thread Bernhard Graf
Aristotle Pagaltzis schrieb: While this fixes the problem, it is still unclear, why the utf8 flag is set for the whole buffer. It shouldn’t matter. But it does. So Ladies and Gentleman, may I present you the culprit? It is YAML::XS! Everything read by YAML::XS perl -MYAML::XS -E ' my

Re: [Catalyst] Re: Avoiding UTF8 in Catalyst

2009-11-23 Thread Bill Moseley
On Mon, Nov 23, 2009 at 10:14 AM, Aristotle Pagaltzis pagalt...@gmx.dewrote: Encode the string to the destination encoding (not just character set), so that the string represents an encoded octet stream, and then look at the plain old character length of that string. That will always give

Re: [Catalyst] How to reduce the memory footprint?

2009-11-23 Thread Tomas Doran
On 23 Nov 2009, at 18:18, Julien Sobrier wrote: Hello, I have quite a small Catalyst application that runs with FastCGI + FCGI::ProcManager::MaxRequests I run 5 instances of FastCGI. Each instance was taking about 90MB of memory. I tried to reduce the memory fooprint by reducing the

[Catalyst] Re: Avoiding UTF8 in Catalyst

2009-11-23 Thread Aristotle Pagaltzis
* Bill Moseley mose...@hank.org [2009-11-23 20:10]: I'd argue that when it's time to set the length it should die if utf8 flag is still set. I’m of two minds about this… it may well be that a string is correctly encoded but has gotten upgraded, and such a string will produce the right output

[Catalyst] Re: Unicode trouble with Catalyst::Engine::FastCGI

2009-11-23 Thread Aristotle Pagaltzis
Hi Bernhard, * Bernhard Graf cataly...@augensalat.de [2009-11-23 20:00]: Aristotle Pagaltzis schrieb: While this fixes the problem, it is still unclear, why the utf8 flag is set for the whole buffer. It shouldn’t matter. But it does. yes, because ::FastCGI is broken. :-) Is what I’m

Re: [Catalyst] How to reduce the memory footprint?

2009-11-23 Thread Julien Sobrier
Right, nprocs=5 I thought 100M RES/300M VIRT meanst 100M per process, and 300M shard among perl processes. I don't have many other processes running on the box. If I turn off catalyst, I use less than 250MB or memory. With Catalyst, I'm over 800MB with some occasional swapping. On Mon, Nov 23,

Re: [Catalyst] How to reduce the memory footprint?

2009-11-23 Thread Dave Rolsky
On Mon, 23 Nov 2009, Julien Sobrier wrote: I run 5 instances of FastCGI. Each instance was taking about 90MB of memory. I tried to reduce the memory fooprint by reducing the number of libraries I used. The memory usage is now 120MB per instance! The memory increase is probably due to other

Re: [Catalyst] How to reduce the memory footprint?

2009-11-23 Thread Rodrigo
On Mon, Nov 23, 2009 at 10:45 PM, J. Shirley jshir...@gmail.com wrote: I wouldn't trust the output of top/ps to determine how much memory is used. -J I do. Not for individual processes, though. But for the totals top is perfectly fine for me. I don't have many other processes running on