in reply to Re^7: Understanding the benefit of Given/When ...
in thread Understanding the benefit of Given/When ...
On exit from the when block, there is an implicit next.
so you can use a simple if where you wanted to write when () { ...; continue} and vice versa you can write when where you wanted to write if () {...; next} ! (as long you don't need the implicit smart match)
In other words: This next in your code
is a tautology...... say " After when /abc/"; when (/def/) {say " Got 'def'"; next;} say " After when /def/"; ...
Cheers Rolf
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^9: Understanding the benefit of Given/When ...
by JavaFan (Canon) on Mar 04, 2010 at 17:48 UTC |