Re:Given/when - The Perl switch statement
by draegtun on Sunday January 23, 2011 @04:12PM
(#2133340)
It's almost like someone took Gherkin (the Cucumber BDD parser) and got it working inline
Almost but not quite. given/when originates from perl6 and has been in the spec from at least 2006 and probably a lot earlier [1]. Its also been part of perl5 since 5.10 (2007) [2].
Almost but not quite. given/when originates from perl6 and has been in the spec from at least 2006 and probably a lot earlier [1]. Its also been part of perl5 since 5.10 (2007) [2].
I believe both of these predate Cucumber/Gherkin.
refs:
[1] http://web.archive.org/web/20061011073242/http://perlcabal.o...
[2] http://perldoc.perl.org/perl5100delta.html#Switch-and-Smart-...