Acme-Chef

 view release on metacpan or  search on metacpan

lib/Acme/Chef.pm  view on Meta::CPAN

ingredients and all ingredients above it rise one place. If there are not
that many ingredients in the bowl, the top ingredient goes to tbe bottom
of the bowl and all the others rise one place.

=item *

C<Mix [the [nth] mixing bowl] well.>

This randomises the order of the ingredients in the nth mixing bowl.

=item *

C<Clean [nth] mixing bowl.>

This removes all the ingredients from the nth mixing bowl.

=item *

C<Pour contents of the [nth] mixing bowl into the [pth] baking dish.>

This copies all the ingredients from the nth mixing bowl to the pth baking 
ish, retaining the order and putting them on top of anything already in
the baking dish.

=item *

C<Verb the ingredient.>

This marks the beginning of a loop. It must appear as a matched pair with
the following statement. The loop executes as follows: The value of
ingredient is checked. If it is non-zero, the body of the loop executes
until it reaches the "until" statement. The value of ingredient is
rechecked. If it is non-zero, the loop executes again. If at any check
the value of ingredient is zero, the loop exits and execution continues
at the statement after the "until". Loops may be nested.

=item *

C<Verb [the ingredient] until verbed.>

This marks the end of a loop. It must appear as a matched pair with the
above statement. verbed must match the Verb in the matching loop start
statement. The Verb in this statement may be arbitrary and is ignored.
If the ingredient appears in this statement, its value is decremented
by 1 when this statement executes. The ingredient does not have to
match the ingredient in the matching loop start statement.

=item *

C<Set aside.>

This causes execution of the innermost loop in which it occurs to end
immediately and execution to continue at the statement after the "until".

=item *

C<Serve with auxiliary-recipe.>

This invokes a sous-chef to immediately prepare the named auxiliary-recipe.
The calling chef waits until the sous-chef is finished before continuing.
See the section on auxiliary recipes below.

=item *

C<Refrigerate [for number hours].>

This causes execution of the recipe in which it appears to end immediately.
If in an auxiliary recipe, the auxiliary recipe ends and the sous-chef's
first mixing bowl is passed back to the calling chef as normal. If a number
of hours is specified, the recipe will print out its first number baking
dishes (see the Serves statement below) before ending.

=back

=head2 Serves

The final statement in a Chef recipe is a statement of how many people
it serves.

  Serves number-of-diners.

This statement writes to STDOUT the contents of the first number-of-diners
baking dishes. It begins with the 1st baking dish, removing values from the
top one by one and printing them until the dish is empty, then progresses to
the next dish, until all the dishes have been printed. The serves statement
is optional, but is required if the recipe is to output anything!

=head2 Auxiliary Recipes

These are small recipes which are needed to produce specialised ingredients
for the main recipe (such as sauces). They are listed after the main recipe.
Auxiliary recipes are made by sous-chefs, so they have their own set of
mixing bowls and baking dishes which the head Chef never sees, but take
copies of all the mixing bowls and baking dishes currently in use by the
calling chef when they are called upon. When the auxiliary recipe is
finished, the ingredients in its first mixing bowl are placed in the same
order into the calling chef's first mixing bowl.

For example, the main recipe calls for a sauce at some point. The sauce
recipe is begun by the sous-chef with an exact copy of all the calling
chef's mixing bowls and baking dishes. Changes to these bowls and dishes
do not affect the calling chef's bowls and dishes. When the sous-chef is
finished, he passes his first mixing bowl back to the calling chef, who
empties it into his first mixing bowl.

An auxiliary recipe may have all the same items as a main recipe. 

=head1 BUGS

A lot. This is a boring night's result.

In particular, the implementation does not always comply to the specification.
While this is admittedly very bad behaviour, the author claims in defense that
it usually allows a broader syntax than the specification so you should be safe
when sticking to the specification.

=head1 AUTHOR

Steffen Mueller.

Chef was designed by David Morgan-Mar.



( run in 1.418 second using v1.01-cache-2.11-cpan-39bf76dae61 )