[Catalyst] HOWTO reference config settings from template

2007-04-12 Thread Jeff Chimene
Hi, I'm not sure if this is a Catalyst question - How do I reference __PACKAGE__config settings from a Template Toolkit template? I'd like to use the config tool to set values outside the stash. Cheers, jec ___ List: [EMAIL PROTECTED] Listinfo:

Re: [Catalyst] HOWTO reference config settings from template

2007-04-12 Thread Peter Karman
Jeff Chimene scribbled on 4/12/07 9:29 AM: Hi, I'm not sure if this is a Catalyst question - How do I reference __PACKAGE__config settings from a Template Toolkit template? I'd like to use the config tool to set values outside the stash. [% c.config.yourconfigkeyhere %] -- Peter

Re: [Catalyst] HOWTO reference config settings from template

2007-04-12 Thread Jeff Chimene
Peter Karman wrote: Jeff Chimene scribbled on 4/12/07 9:29 AM: Hi, I'm not sure if this is a Catalyst question - How do I reference __PACKAGE__config settings from a Template Toolkit template? I'd like to use the config tool to set values outside the stash. [%

Re: [Catalyst] HOWTO reference config settings from template

2007-04-12 Thread Peter Karman
Jeff Chimene scribbled on 4/12/07 10:35 AM: and I don't see the TT2 configuration settings. When I try the similar experiment in the perl module, dump __PACKAGE__-config, the TT2 configuration settings are displayed. that's because your TT config probably isn't getting set in the master

Re: [Catalyst] little syntax

2007-04-12 Thread Jim Spath
Hi Will, You want: $c-stash-{recs} = [EMAIL PROTECTED]; And then to access it in the Template Toolkit template, you want: [% FOREACH row IN recs %] id: [% row.id %] name: [% row.name %]br / [% END %] And you should probably check out the following two URLs for more info on Catalyst +

Re: [Catalyst] HOWTO reference config settings from template

2007-04-12 Thread Jeff Chimene
Peter Karman wrote: Jeff Chimene scribbled on 4/12/07 10:35 AM: and I don't see the TT2 configuration settings. When I try the similar experiment in the perl module, dump __PACKAGE__-config, the TT2 configuration settings are displayed. that's because your TT config probably isn't

Re: [Catalyst] little syntax

2007-04-12 Thread Peter Karman
Will Smith scribbled on 4/12/07 11:43 AM: I have the following piece of code: # in controller ... while ( my $row = $file-read ) { push @record, { id = $row-{id}, name = $row-{name}, }; } $c-stash-{recs} = @records; . What is the syntax on the tt2 to access the id and name?

[Catalyst] Handling slow uploads externally

2007-04-12 Thread Brian Kirkbride
Hello all, I have a CMS-like application using Catalyst for which about 40-50% of requests contain large file uploads. I'm using a pretty standard two-tiered setup to avoid tying up heavy mod_perl procs for slow client downloads. Now I'd like to avoid tying up the heavy procs for slow

Re: [Catalyst] Handling slow uploads externally

2007-04-12 Thread Peter Karman
Brian Kirkbride scribbled on 4/12/07 12:16 PM: Is there something like this in existence already? I searched Google and CPAN but didn't find anything promising. I'd appreciate any tips or suggestions. If I do implement it from scratch, would there be any interest in the CGI and a

Re: [Catalyst] HOWTO reference config settings from template

2007-04-12 Thread Jason Kohles
On Apr 12, 2007, at 1:01 PM, Jeff Chimene wrote: The config is called in the View package (fori::View::Menu) I was hoping to set TT2 values /per package/ via the config as created by the TT2 helper. It looks like (after DEBUG = 'all') that TT2 only references the stash when it resolves

Re: [Catalyst] little syntax

2007-04-12 Thread Bill Moseley
On Thu, Apr 12, 2007 at 09:43:07AM -0700, Will Smith wrote: I have the following piece of code: # in controller ... while ( my $row = $file-read ) { Template Toolkit also has WHILE so you could just pass in $file Extensive use of $c-log-_dump or [% USE Dumper %] or other variations can

[Catalyst] Re: Handling slow uploads externally

2007-04-12 Thread A. Pagaltzis
Hi Brian, * Brian Kirkbride [EMAIL PROTECTED] [2007-04-12 19:25]: I have a CMS-like application using Catalyst for which about 40-50% of requests contain large file uploads. I'm using a pretty standard two-tiered setup to avoid tying up heavy mod_perl procs for slow client downloads. […]

[Catalyst] Re: internal redirect

2007-04-12 Thread A. Pagaltzis
Hi Adeola, * Adeola Awoyemi [EMAIL PROTECTED] [2007-04-11 16:40]: In my application I'm generating images on the fly and want to redirect to the image if creation succeeds. I tried using $c-response-redirect( $new_filepath ) but that issues a 302 Temporarily Moved status. But what I

Re: [Catalyst] Handling slow uploads externally

2007-04-12 Thread Perrin Harkins
On 4/12/07, Brian Kirkbride [EMAIL PROTECTED] wrote: Now I'd like to avoid tying up the heavy procs for slow uploads. Many suggest to run upload handlers as CGI rather than mod_perl because the 1s startup time is negligent compared to the time required to upload. I have tried this and it

Re: [Catalyst] new C::P::A::LDAP for new-style C::P::A

2007-04-12 Thread Jay K
Mentioned on irc, but you can drop the Credential portion of this altogether. All you need to do is use the standard Password credential and set the password_type config option to be 'self_check', and it will do what you want, actually almost _exactly_ what your code does in fact. The

Re: [Catalyst] Handling slow uploads externally

2007-04-12 Thread Brian Kirkbride
Perrin Harkins wrote: On 4/12/07, Brian Kirkbride [EMAIL PROTECTED] wrote: Now I'd like to avoid tying up the heavy procs for slow uploads. Many suggest to run upload handlers as CGI rather than mod_perl because the 1s startup time is negligent compared to the time required to upload. I have

Re: [Catalyst] Re: Handling slow uploads externally

2007-04-12 Thread Brian Kirkbride
A. Pagaltzis wrote: Hi Brian, * Brian Kirkbride [EMAIL PROTECTED] [2007-04-12 19:25]: I have a CMS-like application using Catalyst for which about 40-50% of requests contain large file uploads. I'm using a pretty standard two-tiered setup to avoid tying up heavy mod_perl procs for slow client

Re: [Catalyst] Handling slow uploads externally

2007-04-12 Thread Perrin Harkins
On 4/12/07, Brian Kirkbride [EMAIL PROTECTED] wrote: It doesn't look like mod_proxy, which I am currently using, supports this. It looks like Perlbal does however. Any other suggestions? Since I always use mod_proxy, I can't vouch for any others. I've seen people mention nginx, pound, and

Re: [Catalyst] HOWTO reference config settings from template

2007-04-12 Thread Jeff Chimene
Jason Kohles wrote: On Apr 12, 2007, at 1:01 PM, Jeff Chimene wrote: The config is called in the View package (fori::View::Menu) I was hoping to set TT2 values /per package/ via the config as created by the TT2 helper. It looks like (after DEBUG = 'all') that TT2 only references the stash

Re: [Catalyst] HOWTO reference config settings from template

2007-04-12 Thread Bill Moseley
On Thu, Apr 12, 2007 at 04:18:06PM -0700, Jeff Chimene wrote: Thanks for the reply. The problem I'm trying to solve is referencing (reading) config settings from a template. I'd like to tell one or more templates that sometimes they will use frames sometimes not (debugging). I blithely