Re: [Catalyst] error handling (Chain where ajax and non-ajax actions chain off)

2010-11-10 Thread Eden Cardim
David == David Schmidt davew...@gmx.at writes: David I tend to put related actions into a controller. E.g.: all actions David dealing with artists into the Artists.pm controller and so on. David You advise (as I understood) means having an additional controller for David every controller where I

Re: [Catalyst] Trouble using Catalyst::Controller::FormBuilder

2010-11-10 Thread David Schmidt
On Wed, Nov 10, 2010 at 2:37 PM, Eric Berg eb...@bergbrains.com wrote: I'm trying to get Catalyst::Controller::FormBuilder to work, but am running into some problems.  Per the docs, the config should be like this: use base 'Catalyst::Controller::FormBuilder'; But my class is from a brand-new

Re: [Catalyst] Trouble using Catalyst::Controller::FormBuilder

2010-11-10 Thread Hernan Lopes
indeed, again: here is a simple form example of formhandler with perl catalyst: in your User.pm controller: use HTML::FormHandler; sub fields { return [ display0 = { type = 'Display', html = 'h1Personal data/h1', }, name = { type

Re: [Catalyst] Trouble using Catalyst::Controller::FormBuilder

2010-11-10 Thread Eric Berg
Ok. Thanks Hernan and Dave. I've been using FormBuilder for years, but will take a look at FormHandler. Eric On 11/10/10 9:25 AM, Hernan Lopes wrote: indeed, again: here is a simple form example of formhandler with perl catalyst: in your User.pm controller: use HTML::FormHandler; sub

Re: [Catalyst] error handling (Chain where ajax and non-ajax actionschain off)

2010-11-10 Thread Octavian Rasnita
Hi, From: Eden Cardim edencar...@gmail.com in Controller::Artist: sub error_404 :Action { Can I find more information about the :Action dispatch type? Is it just a replacement for :Private? Or it is something different? Thanks. Octavian ___

Re: [Catalyst] error handling (Chain where ajax and non-ajax actionschain off)

2010-11-10 Thread Hernan Lopes
Octavian, Its just an action with attributes predefie ie: (in your controller): __PACKAGE__-config( action = { myaction = { Chained = 'base', PathPart = q{myaction}, Args = 0, }, }); sub myaction :Action { my ( $self, $c,) = @_; .. }

Re: [Catalyst] Trouble using Catalyst::Controller::FormBuilder

2010-11-10 Thread Eric Berg
That is there, but it was added by Catalyst when I created the controller. I was just starting to look into what that does, but didn't get very far at this point. Can anyone give me a brief explanation? Eric On 11/10/10 10:58 AM, Moritz Onken wrote: Hi, my guess is that you added

Re: [Catalyst] Trouble using Catalyst::Controller::FormBuilder

2010-11-10 Thread Moritz Onken
Hi, my guess is that you added __PACKAGE__-meta-make_immutable to your controller class GLR::Controller::Payment. Try to remove it and add 1; instead. cheers, mo Am 10.11.2010 um 15:11 schrieb David Schmidt: On Wed, Nov 10, 2010 at 2:37 PM, Eric Berg eb...@bergbrains.com wrote: I'm trying to

Re: [Catalyst] Trouble using Catalyst::Controller::FormBuilder

2010-11-10 Thread Moritz Onken
Hi, this is a Moose thing. It inlines things like the constructor of the Controller object. But since the controller is only instantiated once (anyone correct me if I'm wrong) this won't give you a lot of a speed improvement. Just remove the line and be happy :-) Further reading

Re: [Catalyst] error handling (Chain where ajax and non-ajax actionschain off)

2010-11-10 Thread Eden Cardim
Octavian == Octavian Rasnita orasn...@gmail.com writes: Octavian Can I find more information about the :Action dispatch type? Octavian Is it just a replacement for :Private? Or it is something different? Yes, it's effectively a replacement for :Private. -- Eden Cardim

[Catalyst] Download a file - Catalyst Docs 'Cookbook' example doesn't work

2010-11-10 Thread Matthew Braid
Hi all, Part of the site I'm writing includes the ability to download certain files. These files can be large, so going from the cookbook method at http://search.cpan.org/~zarquon/Catalyst-Manual-5.8005/lib/Catalyst/Manual/Cookbook.pod#Forcing_the_browser_to_download_content, I modified it so

Re: [Catalyst] Download a file - Catalyst Docs 'Cookbook' example doesn't work

2010-11-10 Thread Kieren Diment
I'd be inclined to do set $c-stash( served_file = 1) if one of these files is served then avoid forwarding to the view if this stash key is set in MyApp.pm with the following: sub end : ActionClass('RenderView') { my ($self, $c); return 1 if $c-stash(served_file); } See the