everything after the __DATA_ line.~
everything after the __DATA__ line below.~
Perhaps it should read like this, but it may also confuse.
everything after the __DATA__ (or __END__) line below.~
I don't understand which part of this is template and which is your comment. In fact, I'm not sure I even understand the comment.
#~convenient way to structure your input and expected output,
#assuming that you can use whitespace as the delimiter.
I think you meant to do this.
#~convenient way to structure your input and expected output,~
#~assuming that you can use whitespace as the delimiter.~
But that still sounds like I (the newbie) cannot use this method on pipe delimited data. I (the advanced beginner) realize you don't mean that, but you need to put yourself in your student's heads. The student sees this example and wonders how they can adapt there script to look like this one. "But wait," they think, "I don't have a script which opens a file."
You haven't explained to them how to use Test::More. You have not shown them how to test their data with test cases and you haven't showed them what your example script looked like before you started testing.
Have you read the Test::More docs recently?
STOP! If you're just getting started writing tests, have
a look at Test::Simple first. This is a drop in replacement for
Test::Simple which you can switch to once you get the hang of basic
So, here is our lowly newbie taking the high road and looking for some clue on how to ask questions before posting to Perl Monks. She sees your tutorial and starts reading. She gets to the module you want her to use and thinks: "I have no clue how to use a module. And just where in blazes is the is() subroutine coming from?" Let me go read the Test::More docs and (wham!), she finds she now must go learn yet another module (actually two more modules-see below).
There's just too many points at which she can bail out and ask her question anonymously or worse, not ask any question at all. Just giving up on Perl altogether.
I would gently introduce the reader to the Test::More module and then show the reader templates for asking questions. Perhaps their question will be answered in the test setup. Perhaps not. Either way, they now have another tool for solving their future perl problems.
Oh and BTW, the Test::Simple module begins with ** If you are unfamiliar with testing read Test::Tutorial first! ** Test::Tutorial is part of a module's (Test::Simple) documentation. Which means http://search.cpan.org/ can't find it (and it isn't linked from the module docs). Heck, I'm ready to bolt! It's like you had to throw this tutorial together on a deadline.
I associate a template with a fancy (or plain) fill in the blank form. I am asked questions and the answers are entered into the template. Then some magic happens and my question is ready to be asked. I don't see that association from your template.
I guess I'm saying (as gently as possible) that you need to be a bit more long winded. Explain each step to the student. Don't assume she already knows Test::More and Test::Simple and Test::Tutorial and how to find the docs for further reading. Assume she has no freaking clue how to properly ask a question on Perl monks and assume she is ready to bolt from your class for the slimmest reasons.