Re: [Catalyst] I18N with variables

2010-08-04 Thread Ton Voon
On 2 Aug 2010, at 06:08, Julien Sobrier wrote: Hello, I've started to translate my website using Catalyst::Plugin::I18N. It works fine for static text. Bu I can't make it work for variables. For example, I need to a translation for [% foo %] where for can take a set of values defined in a

Re: [Catalyst] Trapping exceptions in Catalyst.pm

2010-08-04 Thread Ton Voon
On 2 Aug 2010, at 07:49, Bill Moseley wrote: In execute() there's this code: eval { $c-state( $code-execute( $class, $c, @{ $c-req- args } ) || 0 ) }; $c-_stats_finish_execute( $stats_info ) if $c-use_stats and $stats_info; my $last = pop( @{ $c-stack } ); if ( my

Re: [Catalyst] Trapping exceptions in Catalyst.pm

2010-08-04 Thread Tomas Doran
On 4 Aug 2010, at 10:06, Ton Voon wrote: In general, it's better to test the return value from eval directly instead of depend on $...@. Something like: my $has_exception; eval { $c-state( $code-execute( $class, $c, @{ $c-req-args } ) || 0 ); 1; } || $has_exception++; ... if (

Re: [Catalyst] Cross-link: How do I turn Moose objects into JSON for use in Catalyst?

2010-08-04 Thread Tomas Doran
On 3 Aug 2010, at 17:31, Evan Carroll wrote: I've posted a question and a few possible fixes. Does anyone have anything to add here? How do you go about dumping Moose to JSON in Cat? I use MooseX::Storage, as per perigrin's comment on the stack overflow post. Cheers t0m

Re: [Catalyst] I18N with variables

2010-08-04 Thread Nicholas Wehr
Check out Catalyst::Plugin::Localize::Simple http://search.cpan.org/~wehr/Catalyst-Plugin-Localize-Simple-1.1/lib/Catalyst/Plugin/Localize/Simple.pm I made it to overcome the learning curve of i18n, and it works very well. Used it to translate English to Spanish, French, Japanese, Italian,

Re: [Catalyst] process a restored request

2010-08-04 Thread Steve
Original post: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/msg01222.html My apologies for rehashing this old post, but this is such a *nice* thing to do for users that I'm sort of surprised the solution hasn't been implemented as a plugin or something, at least so far as I can

Re: [Catalyst] Catalyst::Test local_request(), Test::WWW::Mechanize::Catalyst, and base href=...

2010-08-04 Thread Ronald J Kimball
On Mon, Aug 2, 2010 at 5:56 PM, Tomas Doran bobtf...@bobtfish.net wrote: On 29 Jul 2010, at 21:40, Ronald J Kimball wrote: The only reference I found to this issue is a post to this mailing list from 2007, which no one answered.  Has anyone else experienced this problem?  Would a patch that

Re: [Catalyst] process a restored request

2010-08-04 Thread Bill Moseley
On Wed, Aug 4, 2010 at 11:22 AM, Steve st...@matsch.com wrote: Original post: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/msg01222.html My apologies for rehashing this old post, but this is such a *nice* thing to do for users that I'm sort of surprised the solution hasn't been

Re: [Catalyst] process a restored request

2010-08-04 Thread Steve
Thanks so much! I'm surprised this hasn't come up more often, as it seems such a common thing for an application to allow for. FWIW, I think this would make an excellent tutorial, perhaps for next advent calendar, or even the next Catalyst book! :-) On 8/4/2010 3:09 PM, Bill Moseley wrote: