Re: [Catalyst] Defining ARRAY in Config::General config

2010-09-21 Thread Kamen Naydenov
On Tue, Sep 21, 2010 at 07:29, Pavel A. Karoukin hipp...@gmail.com wrote: Hello, I am using Catalyst::Plugin::Mail and want to define email config in myapp.conf. But C::P::Mail expects email config variable to be array ref. How I can assign array value to config variable in myapp.conf?

Re: [Catalyst] best practices for handling forms?

2010-09-21 Thread Octavian Rasnita
Hi, A clean example that uses HTML::FormFu is: package MyApp::Controller::Foo; use Moose; extends 'Catalyst::Controller::HTML::FormFu'; # or just use parent 'Catalyst::Controller::HTML::FormFu' if you don't use Moose sub edit : Local FormConfig { my ($self, $c, $id) = @_; my $form =

Re: [Catalyst] Defining ARRAY in Config::General config

2010-09-21 Thread Octavian Rasnita
The problem appears when the array should have just a single item, because in that case Config::General reports it as a scalar value. I don't know if there is a better way of defining a single-item array with Config::General, but I found a workaround that may work. We can use something like:

Re: [Catalyst] Defining ARRAY in Config::General config

2010-09-21 Thread Andrew Rodland
On Tuesday, September 21, 2010 02:52:52 am Octavian Rasnita wrote: The problem appears when the array should have just a single item, because in that case Config::General reports it as a scalar value. I don't know if there is a better way of defining a single-item array with Config::General,

Re: [Catalyst] Defining ARRAY in Config::General config

2010-09-21 Thread Octavian Rasnita
Hi Andrew, I tried: C:\Documents and Settings\Teddy perl -MConfig::General -e print $Config::General::VERSION 2.49 #The program: use Config::General; use Data::Dumper; my $conf = Config::General-new('config.conf'); my %conf = $conf-getall; print Dumper \%conf; #The configuration file:

Re: [Catalyst] Defining ARRAY in Config::General config

2010-09-21 Thread Emanuele Zeppieri
On Tue, Sep 21, 2010 at 2:14 PM, Octavian Rasnita octavian.rasn...@ssifbroker.ro wrote: Hi Andrew, I tried: C:\Documents and Settings\Teddy perl -MConfig::General -e print $Config::General::VERSION 2.49 #The program: use Config::General; use Data::Dumper; my $conf =

Re: [Catalyst] Defining ARRAY in Config::General config

2010-09-21 Thread Pavel A. Karoukin
On Tue, Sep 21, 2010 at 8:06 AM, Emanuele Zeppieri ema...@gmail.com wrote: On Tue, Sep 21, 2010 at 2:14 PM, Octavian Rasnita octavian.rasn...@ssifbroker.ro wrote: Hi Andrew, I tried: C:\Documents and Settings\Teddy perl -MConfig::General -e print $Config::General::VERSION 2.49

Re: [Catalyst] Defining ARRAY in Config::General config

2010-09-21 Thread Emanuele Zeppieri
On Tue, Sep 21, 2010 at 3:30 PM, Pavel A. Karoukin pa...@yepcorp.com wrote: On Tue, Sep 21, 2010 at 8:06 AM, Emanuele Zeppieri ema...@gmail.com wrote: On Tue, Sep 21, 2010 at 2:14 PM, Octavian Rasnita octavian.rasn...@ssifbroker.ro wrote: Hi Andrew, I tried: C:\Documents and

[Catalyst] Re: Defining ARRAY in Config::General config

2010-09-21 Thread Dagfinn Ilmari Mannsåker
Pavel A. Karoukin pa...@yepcorp.com writes: On Tue, Sep 21, 2010 at 8:06 AM, Emanuele Zeppieri ema...@gmail.com wrote: To obtain single value arrays with the syntax in question, the above line should be: my $conf = Config::General-new( -ConfigFile = 'config.conf', -ForceArray = 1 ); How

Re: [Catalyst] Defining ARRAY in Config::General config

2010-09-21 Thread Pavel A. Karoukin
On Tue, Sep 21, 2010 at 8:53 AM, Emanuele Zeppieri ema...@gmail.com wrote: On Tue, Sep 21, 2010 at 3:30 PM, Pavel A. Karoukin pa...@yepcorp.com wrote: On Tue, Sep 21, 2010 at 8:06 AM, Emanuele Zeppieri ema...@gmail.com wrote: On Tue, Sep 21, 2010 at 2:14 PM, Octavian Rasnita

[Catalyst] Pb with fcgid on CentOS

2010-09-21 Thread jul....@gmail.com
Hi, I have a trouble to run Catalyst with Apache2/fcgid/suexec on CentOS 5.5 I have a classical VirtualHost definition in the apache configuration with : DocumentRoot /opt/myapp/root Alias /static /opt/myapp/root/static SuexecUserGroup appuser appuser Location /static

Re: [Catalyst] Make the money format macro globally available.

2010-09-21 Thread Larry Leszczynski
Hi Duncan - On Tue, 21 Sep 2010 17:52 +0100, Duncan Garland duncan.garl...@motortrak.com wrote: How do you make the money macro available in all templates? [% USE money=format('%.2f') -%] Presumably something goes in here: __PACKAGE__-config( TEMPLATE_EXTENSION = '.tt',

Re: [Catalyst] best practices for handling forms?

2010-09-21 Thread E R
Hernan, Octavian - thanks for your replies. Both of you have given examples where the display of the form and the processing of the form are handled by the same method. In that case in order to go from one page to the next you always need to use a redirect. Doing this is very clean, but it

Re: [Catalyst] Defining ARRAY in Config::General config

2010-09-21 Thread Octavian Rasnita
From: Emanuele Zeppieri ema...@gmail.com To obtain single value arrays with the syntax in question, the above line should be: my $conf = Config::General-new( -ConfigFile = 'config.conf', -ForceArray = 1 ); Aa, thanks. Octavian ___ List:

Re: [Catalyst] best practices for handling forms?

2010-09-21 Thread Octavian Rasnita
You don't need to do the redirect if you don't want it, but it is the recommended way. Instead of the redirect, you can forward to another method that prints the page you want: $c-forward('foo/success_method', ['possible', 'parameters']); In that case after the data is stored in DB, the

Re: [Catalyst] Defining ARRAY in Config::General config

2010-09-21 Thread Andrew Rodland
On Tuesday, September 21, 2010 08:30:43 am Pavel A. Karoukin wrote: On Tue, Sep 21, 2010 at 8:06 AM, Emanuele Zeppieri ema...@gmail.com wrote: On Tue, Sep 21, 2010 at 2:14 PM, Octavian Rasnita my $conf = Config::General-new( -ConfigFile = 'config.conf', -ForceArray = 1 ); How I can pass

[Catalyst] New install getting Wide character in syswrite error

2010-09-21 Thread Charlie Garrison
Good afternoon, I setup an installation of our app for a new developer last night and keep getting the 'Caught exception in engine Wide character in syswrite at...' error when making POST requests. Reading through the archives I expect this is a Unicode encoding problem. But I can't figure