WWW::MenuGrinder::Role::ItemMogrifier - WWW::MenuGrinder role for plugins that modify menus item-by-item per request.
version 0.06
$plugin->item_mogrify_methods
Returns a list of the methods that your plugin provides as an ItemMogrifier. Each method on this list will be executed on each item of the menu tree, and if a plugin provides more than one item mogrify method, each will be called on a separate complete pass over the tree, enabling two-phase processing. If you do not override item_mogrifiy_methods your plugin is assumed to provide one method, named item_mogrify.
ItemMogrifier
item_mogrifiy_methods
item_mogrify
$plugin->item_mogrify($item)
Is called on each item of the menu tree, in postorder. May modify $item in-place or modify it by copying; either way the new $item should be returned. If () is returned instead, the item (and all of its children) are removed from the menu.
$item
()
Andrew Rodland <andrew@hbslabs.com>
This software is copyright (c) 2011 by HBS Labs, LLC..
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WWW::MenuGrinder, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::MenuGrinder
CPAN shell
perl -MCPAN -e shell install WWW::MenuGrinder
For more information on module installation, please visit the detailed CPAN module installation guide.