[Catalyst] Catalyst::Controller::BindLex RECIPE for :Param

Michael Reece mreece at vinq.com
Tue Jan 2 19:07:15 GMT 2007


narrowed this down to a failure even with:

   package MyApp::Controller;
   use base qw/Catalyst::Controller/;
   __PACKAGE__->config;

so it does not appear to be related to BindLex, but something about  
calling __PACKAGE__->config within the controller base class.  i'll  
keep digging.


On Jan 2, 2007, at 10:47 AM, Michael Reece wrote:

> i am trying to follow the recipe mentioned here:
>
> http://search.cpan.org/~nuffin/Catalyst-Controller-BindLex-0.03/lib/ 
> Catalyst/Controller/BindLex.pm#RECIPES
>
>     __PACKAGE__->config->{bindlex}{Param} => sub { $_[0]->req- 
> >params };
>
> after the obvious s/=>/=/, i put this line in MyApp/Controller.pm  
> (the base class for all my controllers).
>
>   package MyApp::Controller;
>   use base qw/Catalyst::Controller::BindLex/;
>
>   __PACKAGE__->config->{bindlex}{Param} = sub { $_[0]->req->params };
>
> however, i wonder if the base controller is not the right place for  
> this, or if anyone has successfully managed to implement this recipe.
>
> after restarting my app, what used to be
>
> [debug] Loaded Path actions:
> .------------------------------------- 
> +--------------------------------------.
> | Path                                |  
> Private                              |
> +------------------------------------- 
> +--------------------------------------+
> | /                                   | / 
> index                               |
> | /admin/index                        | /admin/ 
> index                         |
> | /area_overview                      | /area_overview/ 
> index                 |
> | /captcha                            | /captcha/ 
> index                       |
> | /captcha/image                      | /captcha/ 
> image                       |
> | /catalyst                           | / 
> catalyst                            |
> | /error/bad_conf_name                | /error/ 
> bad_conf_name                 |
> | /error/dump                         | /error/ 
> dump                          |
> | /error/no_conf_name                 | /error/ 
> no_conf_name                  |
> | /headerimage                        | /headerimage/ 
> default                 |
> | /headerimage                        | /headerimage/ 
> index                   |
> [..snip..]
>
> becomes
>
> [debug] Loaded Path actions:
> .------------------------------------- 
> +--------------------------------------.
> | Path                                |  
> Private                              |
> +------------------------------------- 
> +--------------------------------------+
> | /                                   | / 
> index                               |
> | /                                   | / 
> index                               |
> | /                                   | / 
> index                               |
> | /                                   | / 
> default                             |
> | /                                   | / 
> index                               |
> | /bad_conf_name                      | / 
> bad_conf_name                       |
> | /catalyst                           | / 
> catalyst                            |
> | /dump                               | / 
> dump                                |
> | /image                              | / 
> image                               |
> | /index                              | / 
> index                               |
> [..snip..]
>
> which is decidedly not right.
>
> other controllers below this list are mapped the same before and  
> after, but these are not.
>
> any ideas?  thx.
>
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/ 
> catalyst at lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/

---
michael reece :: software engineer :: mreece at vinq.com





More information about the Catalyst mailing list