| MealMaster documentation | Contained in the MealMaster distribution. |
MealMaster::Ingredient - Represent a MealMaster ingredient
print "Ingredients:\n";
foreach my $i (@{$r->ingredients}) {
print " " . $i->quantity .
" " . $i->measure .
" " . $i->product .
"\n";
}
MealMaster::Ingredient represents an ingredient in a MealMaster recipe.
Returns the measurement unit of the ingredient:
print $i->measure . "\n";
Returns the ingredient name:
print $i->product . "\n";
Returns the quantity of measures needed:
print $i->quantity . "\n";
Leon Brocard, <acme@astray.com>
Copyright (C) 2005, Leon Brocard
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
| MealMaster documentation | Contained in the MealMaster distribution. |
package MealMaster::Ingredient; use strict; use base qw(Class::Accessor::Chained::Fast); __PACKAGE__->mk_accessors(qw(quantity measure product)); 1; __END__