Hi everyone
I'm writing a Catalyst app and currently trying to generate a breadcrumbs script (Catalyst::Plugin::Breadcrumbs has been helpful in pointing me in the right direction, but doesn't quite do what I want and in any case doesn't seem to have been touched since 2006).
I'm using chained actions and one or two of my controllers have multiple links in the chain; therefore I think I need to expand these actions from $c->request->action in order to get proper breadcrumbs - however I don't seem to be doing this correctly; as far as I can tell, I should be able to call $c->dispatcher->expand_action, but putting the result of this into a debug statement to see the result yielded an error:
The code: $c->log->debug( $c->dispatcher->expand_action( $c->request->action ) );
Errors with:
'Can't call method "attributes" without a package or object reference at D:/WAMP/Perl/site/lib/Catalyst/DispatchType/Chained.pm line 458' (yeah, Windows, don't hate me - developing on my work laptop, it'll be on CentOS eventually! :-) )
I am sure I'm probably doing something really stupid like passing the wrong value into the expand_action sub, but I can't think what else may actually need to go in there, as far as I can tell it takes a Catalyst action.
Many thanks in advance for any assistance you may be able to give.
Chris
In reply to Catalyst::Dispatcher - usage of expand_actions by mkchris
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |