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");
MealMaster::Recipe, MealMaster::Ingredient
Leon Brocard, <acme@astray.com>
<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.
To install MealMaster, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MealMaster
CPAN shell
perl -MCPAN -e shell install MealMaster
For more information on module installation, please visit the detailed CPAN module installation guide.