WWW::Restaurant::Menu::Item - A Perl base class for menu items on restaurant online menus.
0.11
use WWW::Restaurant::Menu::Item; # The following sub-classes are also provided: # WWW::Restaurant::Menu::Item::Starter # WWW::Restaurant::Menu::Item::Meal # WWW::Restaurant::Menu::Item::Dessert # WWW::Restaurant::Menu::Item::Drink # Construction: my $item = WWW::Restaurant::Menu::Item[::<Subclass>]->new( name => 'French Fries', price => '1.80' ); # Methods: my $name = $item->name; my $price = $item->price;
This is a Perl base class for menu items on restaurant online menus.
The following constructor is provided:
Creates a new WWW::Restaurant::Menu::Item object. %options is a list of key/value pairs representing any of the following options:
WWW::Restaurant::Menu::Item
%options
REQUIRED. A string denoting the name/description of the menu item.
A unit-less numerical value denoting the price of the menu item.
A string denoting the currency of the price.
The following instance methods are provided:
Returns a string denoting the name/description of the menu item.
Returns a unit-less numerical value denoting the price of the menu item. The currency is that of the menu containing the item.
For COPYRIGHT and LICENSE information, see WWW::Restaurant::Menu::Overview.
Julian Mehnle <julian@mehnle.net>
To install WWW::Restaurant::Menu, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Restaurant::Menu
CPAN shell
perl -MCPAN -e shell install WWW::Restaurant::Menu
For more information on module installation, please visit the detailed CPAN module installation guide.