in reply to Re: Cleaning the Monastery dishes
in thread Cleaning the Monastery dishes
We tell the children and we tell the children: use strict; use warnings;.
Just adding a comment does not a singleton make, and if it is a singleton why do you need an assignment inside the loop?
Is there not a send member on the DishesFactory object? If you use the asynchronous get member there is no need to use the send member. Indeed the send member should only be used for reporting failed gets.
use @dishes; is simply an error. I think you intended $Monks->use (@dishes);
DESTROY @dishes; is a syntax error. Use @dishes = ();
sleep until next $mealtime; is just hoplessley confused. The following would be appropriate:
my $nextMealTime = $mealTime->next (); sleep (60) while (time < $nextMealTime);
And finally, there is absolutly no need for a goto. you could use {...; redo;} instead, but there are many other options (see here).
Very poor marks for this effort I'm affraid. Try harder next time, we know that you can do better than this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Cleaning the Monastery dishes
by jdporter (Paladin) on Oct 03, 2005 at 22:01 UTC | |
by GrandFather (Saint) on Oct 03, 2005 at 22:37 UTC |