NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Too distracting (Score:2)
Too strange! (Score:2)
The code is definitely too strange.
Once you've read the perlmonks post it makes sense, but overall I think that the __ANON__ trick will obscure your main point. It might be better to keep the tutorial focused on showing how you write just enough code to pass the tests (which you are not quite doing when you use tricks like this BTW).
mirod
Another vote for too distracting (Score:1)
I'd just use the normal _leading_underscore convention that more people will be familiar with for a tutorial on TDD. You'll just have to spend time explaining the method, which will distract from your main point.
(we must be on the same ley-line since I'm writing a little tutorial myself on TDD - not aimed at perlmonks tho :-)