Subject: | code in synopsis doesn't work |
Using the code in the synopsis:
package MyApp::Model::Menu;
use base 'Catalyst::Model::MenuGrinder';
__PACKAGE__->config(
menu_config => {
plugins => [
'XMLLoader',
'DefaultTarget',
'NullOutput',
],
filename => MyApp->path_to('root', 'menu.xml'),
},
);
Caused an exception:
Couldn't instantiate component "PlasmoGem::Web::Model::Menu", "Can't
coerce array into hash
Looking at WWW::MenuGrinder, it seems that 'plugins' does indeed need a
HashRef, not an ArrayRef as shown in the docs.
Versions of the relevant modules on my system:
Name: Catalyst::Model::MenuGrinder
Version: 0.06
Name: WWW::MenuGrinder
Version: 0.06
Name: Catalyst::Devel
Version: 1.36
Name: Catalyst::Runtime
Version: 5.90011