[Mastering-perl] Chapter 18 - Modulinos, and other patches
Philippe Bruhat BooK
philippe.bruhat at free.fr
Thu Jan 4 10:18:46 EST 2007
Hi,
Chapter 18 contains a test script for the modulino:
use Test::More;
use_ok( 'Japh' );
is( main::run(), "Just another Perl Hacker, \n" );
First, the plan is missing, as shows the output:
You tried to run a test without a plan! Gotta have a plan. at /usr/share/perl/5.8/Test/More.pm line 676
And even after adding the plan, the test script fails:
1..2
ok 1 - use Japh;
Just another Perl Hacker,
not ok 2
# Failed test in test.pl at line 6.
# got: '1'
# expected: 'Just another Perl Hacker,
# '
# Looks like you failed 1 test of 2.
Since the run() subroutine is the program itself in a modulino, it is
usually the one I try to keep as small as possible (just call a bunch
of routines with the result of the first few ones), and also the one
I never can test.
After reading the rest of the chapter, I see that the test script
is enhanced. Maybe you should mention that the first test script is
not final.
* * *
In the multilingual version of Japh.pm, you show the following templates:
fr_FR "juste un autre intrus de %s, "
fr_FR "juste un autre intrus de [% topic %], "
"intrus" in French is an intruder, the bad kind of hacker (that's how
BabelFish translates it). I'm not sure there is a French word that is
a correct translation of "hacker". So, since you used "hacker" for all
the other languages, you might as well use it for the French version.
:-)
* * *
Attached are small patch files. Most of those are the result of my
search for "its" used in place of "it's".
--
Philippe "BooK" Bruhat
Wisdom cannot be bought. It can, at best, be rented until you can find
your own. (Moral from Groo The Wanderer #66 (Epic))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 12.error_handling.pod.patch
Type: text/x-diff
Size: 1649 bytes
Desc: not available
Url : http://five.pairlist.net/pipermail/mastering-perl/attachments/20070104/0857e2db/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 11.configuration.pod.patch
Type: text/x-diff
Size: 736 bytes
Desc: not available
Url : http://five.pairlist.net/pipermail/mastering-perl/attachments/20070104/0857e2db/attachment-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 10.subclassing.pod.patch
Type: text/x-diff
Size: 937 bytes
Desc: not available
Url : http://five.pairlist.net/pipermail/mastering-perl/attachments/20070104/0857e2db/attachment-0002.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 14.persistence.pod.patch
Type: text/x-diff
Size: 716 bytes
Desc: not available
Url : http://five.pairlist.net/pipermail/mastering-perl/attachments/20070104/0857e2db/attachment-0003.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 04.debugger.pod.patch
Type: text/x-diff
Size: 1256 bytes
Desc: not available
Url : http://five.pairlist.net/pipermail/mastering-perl/attachments/20070104/0857e2db/attachment-0004.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 03.taint-checking.pod.patch
Type: text/x-diff
Size: 498 bytes
Desc: not available
Url : http://five.pairlist.net/pipermail/mastering-perl/attachments/20070104/0857e2db/attachment-0005.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 07.cleaning_up_code.pod.patch
Type: text/x-diff
Size: 1143 bytes
Desc: not available
Url : http://five.pairlist.net/pipermail/mastering-perl/attachments/20070104/0857e2db/attachment-0006.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 05.profiling.pod.patch
Type: text/x-diff
Size: 1096 bytes
Desc: not available
Url : http://five.pairlist.net/pipermail/mastering-perl/attachments/20070104/0857e2db/attachment-0007.bin
More information about the Mastering-perl
mailing list