Julian Mehnle > WWW-Restaurant-Menu-0.11 > WWW::Restaurant::Menu::Item

Download:
www-restaurant-menu/WWW-Restaurant-Menu-0.11.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.11   Source  

NAME ^

WWW::Restaurant::Menu::Item - A Perl base class for menu items on restaurant online menus.

VERSION ^

0.11

SYNOPSIS ^

    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;

DESCRIPTION ^

This is a Perl base class for menu items on restaurant online menus.

Constructor

The following constructor is provided:

new(%options): RETURNS WWW::Restaurant::Menu::Item

Creates a new WWW::Restaurant::Menu::Item object. %options is a list of key/value pairs representing any of the following options:

name

REQUIRED. A string denoting the name/description of the menu item.

price

A unit-less numerical value denoting the price of the menu item.

currency

A string denoting the currency of the price.

Instance methods

The following instance methods are provided:

name: RETURNS SCALAR

Returns a string denoting the name/description of the menu item.

price: RETURNS SCALAR

Returns a unit-less numerical value denoting the price of the menu item. The currency is that of the menu containing the item.

SEE ALSO ^

For COPYRIGHT and LICENSE information, see WWW::Restaurant::Menu::Overview.

AUTHOR ^

Julian Mehnle <julian@mehnle.net>

syntax highlighting: