YUI::MenuBar::Markup::YAML - Provides the menu content from a YAML file
It reads a YAML file, gets the content and returns it so that YUI::MenuBar::Markup can use it for building YUI menu.
It uses YAML::Syck for reading the YAML file.
An example of a YAML file can be:
menu: - name: Searchers menu: - name: Yahoo! link: http://search.yahoo.com - name: Google link: http://www.google.com - name: Altavista link: http://www.altavista.com - name: Mail menu: - name: Yahoo Mail! link: http://mail.yahoo.com - name: Gmail link: http://gmail.com -
And so on, for any additional sub-menu you should just declare a new menu: and then list the items of it.
Valid items or any menu item are:
name: The name (text) of the item.
link: The link where the item will be pointing
menu: In case the item will have sub-items
YAML path filename
Opens the YAML file (see filename) and looks for the first menu item, once its found then all of its items are returned.
The method is called by YUI::MenuBar::Markup.
Pablo Fischer (pablo@pablo.com.mx).
Copyright (C) 2010 by Pablo Fischer.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install YUI::MenuBar::Markup, copy and paste the appropriate command in to your terminal.
cpanm
cpanm YUI::MenuBar::Markup
CPAN shell
perl -MCPAN -e shell install YUI::MenuBar::Markup
For more information on module installation, please visit the detailed CPAN module installation guide.