| MealMaster documentation | view source | Contained in the MealMaster distribution. |
MealMaster - Parse MealMaster format recipe files
my $mm = MealMaster->new();
my @recipes = $mm->parse("t/31000.mmf");
foreach my $r (@recipes) {
print "Title: " . $r->title . "\n";
print "Categories: " . join(", ", sort @{$r->categories}) . "\n";
print "Yield: " . $r->yield . "\n";
print "Directions: " . $r->directions . "\n";
print "Ingredients:\n";
foreach my $i (@{$r->ingredients}) {
print " " . $i->quantity .
" " . $i->measure .
" " . $i->product .
"\n";
}
People like to share food recipes on the internet. MealMaster is a popular program for collating recipes. The MealMaster module parses the MealMaster recipe export format, providing you with recipe objects. You can recognize these MealMaster format files as they generally start with "Recipe via Meal-Master".
The constructor. Takes no arguments:
my $mm = MealMaster->new();
The parse method takes a filename and recipes an array of MealMaster::Recipe objects representing the recipes in the file:
my @recipes = $mm->parse("t/31000.mmf");
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 | view source | Contained in the MealMaster distribution. |