RE: [Catalyst] Dispatching based on path and host/domain

2008-04-23 Thread Curtis Fletcher
Write an Action Class. You can put whatever you want in the match() method. In your case, return 0 if grep { $c-req-host =~ /$_/ } @{$self-attributes-{Domain}||[]} I gave this a go (in principle it looks ideal), but the documentation on Catalyst::Action is pretty sparse and only talks

Re: [Catalyst] Dispatching based on path and host/domain

2008-04-23 Thread Matt S Trout
On Wed, Apr 23, 2008 at 12:22:36PM +0100, Curtis Fletcher wrote: Write an Action Class. You can put whatever you want in the match() method. In your case, return 0 if grep { $c-req-host =~ /$_/ } @{$self-attributes-{Domain}||[]} I gave this a go (in principle it looks ideal), but

Re: [Catalyst] TT custom virtual methods available to all pages.

2008-04-23 Thread Felix Antonius Wilhelm Ostmann
i love such liddle funktions as FILTER :) in View::TT __PACKAGE__-config( { CATALYST_VAR = 'catalyst', ... FILTERS = { yesno = sub { $_[0] ? 'yes' : 'no'; }, onoff = sub { $_[0] ? 'on' : 'off';

Re: [Catalyst] Dispatching based on path and host/domain

2008-04-23 Thread Matt S Trout
On Wed, Apr 23, 2008 at 03:25:47PM +0100, Curtis Fletcher wrote: -Original Message- From: Matt S Trout [mailto:[EMAIL PROTECTED] Sent: 23 April 2008 14:34 To: The elegant MVC web framework Subject: Re: [Catalyst] Dispatching based on path and host/domain :Local is a

Re: [Catalyst] TT custom virtual methods available to all pages.

2008-04-23 Thread Matt S Trout
On Wed, Apr 23, 2008 at 09:45:15AM -0500, Rajeev Cyrus wrote: Greetings. One of my TT pages required some massaging of data that I decided to do via referencing a subroutine in a template variable, eg: $c-stash-{mk_hash} = \mk_hash; I would like to use this stashed variable on all of my