Re: [Catalyst] XSD Validation of Forms

2009-08-11 Thread Alejandro Imass
Great input and insight, thanks! My comment was perhaps more oriented to using a common declarative validation idiom such as an xml schema because with this particular project, I found myself maintaining FormBuilder YAML files and XSDs. Then I decided to convert HTML to XML and use the common XSD

[Catalyst] Loading template according to request path

2009-08-11 Thread Matt Whipple
Is there a presently existing mechanism which flexibly allows for template selection according to the request URI? For instance a request to www.myapp.com/somepage would set something like stash(template = 'somepage.tt') if the file exists and continue to be processed by the appropriate or

Re: [Catalyst] Loading template according to request path

2009-08-11 Thread J. Shirley
On Tue, Aug 11, 2009 at 12:09 PM, Matt Whipple m...@mattwhipple.com wrote: Is there a presently existing mechanism which flexibly allows for template selection according to the request URI? For instance a request to www.myapp.com/somepage would set something like stash(template = '

Re: [Catalyst] Loading template according to request path

2009-08-11 Thread Matt Whipple
J. Shirley wrote: On Tue, Aug 11, 2009 at 12:09 PM, Matt Whipple m...@mattwhipple.com mailto:m...@mattwhipple.com wrote: Is there a presently existing mechanism which flexibly allows for template selection according to the request URI? For instance a request to

Re: [Catalyst] Loading template according to request path

2009-08-11 Thread fREW Schmidt
On Tue, Aug 11, 2009 at 3:01 PM, Matt Whipple m...@mattwhipple.com wrote: J. Shirley wrote: On Tue, Aug 11, 2009 at 12:09 PM, Matt Whipple m...@mattwhipple.commailto: m...@mattwhipple.com wrote: Is there a presently existing mechanism which flexibly allows for template selection

Re: [Catalyst] Loading template according to request path

2009-08-11 Thread Alejandro Imass
Well in Catalyst an action is usually mapped to a controller method, so I really don't understand your request. Maybe this example will help: sub edit : Local { my ( $self, $c ) = @_; my $uri = URI-new($c-req-base); # get whatever you want from the URI my $auth = $uri-authority; #do

Re: [Catalyst] Loading template according to request path

2009-08-11 Thread J. Shirley
On Tue, Aug 11, 2009 at 1:01 PM, Matt Whipple m...@mattwhipple.com wrote: This is the default behavior for View::TT, as it says in the POD: If a stash item isn't defined, then it instead uses the stringification of the action dispatched to (as defined by $c-action) in the above example,

Re: [Catalyst] Loading template according to request path

2009-08-11 Thread J. Shirley
On Tue, Aug 11, 2009 at 1:34 PM, Alejandro Imass alejandro.im...@gmail.comwrote: Well in Catalyst an action is usually mapped to a controller method, so I really don't understand your request. Maybe this example will help: sub edit : Local { my ( $self, $c ) = @_; my $uri =

Re: [Catalyst] Loading template according to request path

2009-08-11 Thread Matt Whipple
On Tue, Aug 11, 2009 at 3:01 PM, Matt Whipple m...@mattwhipple.com mailto:m...@mattwhipple.com wrote: J. Shirley wrote: On Tue, Aug 11, 2009 at 12:09 PM, Matt Whipple m...@mattwhipple.com mailto:m...@mattwhipple.com mailto:m...@mattwhipple.com

Re: [Catalyst] Loading template according to request path

2009-08-11 Thread Eden Cardim
On Tue, Aug 11, 2009 at 2:15 PM, Matt Whipplem...@mattwhipple.com wrote: Thanks everyone for your input, I'm certainly gathering that there is nothing preexisting that does what I'm looking to do.  I'll continue to clean up my version and throw it on CPAN if it seems appealing enough.  As a

Re: [Catalyst] Loading template according to request path

2009-08-11 Thread Alejandro Imass
very cool!, live and learn, thanks!! On Tue, Aug 11, 2009 at 4:59 PM, J. Shirleyjshir...@gmail.com wrote: On Tue, Aug 11, 2009 at 1:34 PM, Alejandro Imass alejandro.im...@gmail.com wrote: Well in Catalyst an action is usually mapped to a controller method, so I really don't understand your

Re: [Catalyst] Loading template according to request path

2009-08-11 Thread Matt Whipple
Eden Cardim wrote: On Tue, Aug 11, 2009 at 2:15 PM, Matt Whipplem...@mattwhipple.com wrote: Thanks everyone for your input, I'm certainly gathering that there is nothing preexisting that does what I'm looking to do. I'll continue to clean up my version and throw it on CPAN if it seems

Re: [Catalyst] Loading template according to request path

2009-08-11 Thread J. Shirley
On Tue, Aug 11, 2009 at 2:47 PM, Eden Cardim edencar...@gmail.com wrote: On Tue, Aug 11, 2009 at 2:15 PM, Matt Whipplem...@mattwhipple.com wrote: Thanks everyone for your input, I'm certainly gathering that there is nothing preexisting that does what I'm looking to do. I'll continue to

Re: [Catalyst] XSD Validation of Forms

2009-08-11 Thread Chris
My comment was perhaps more oriented to using a common declarative validation idiom such as an xml schema because with this particular project, I found myself maintaining FormBuilder YAML files and XSDs. Then I decided to convert HTML to XML and use the common XSD for both. Since most decent