Stories
Slash Boxes
Comments
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

use Perl Log In

Log In

[ Create a new account ]

tokuhirom (7396)

tokuhirom
  (email not shown publicly)
http://d.hatena.ne.jp/tokuhirom/

Journal of tokuhirom (7396)

Wednesday June 11, 2008
11:05 PM

Test::Snippet - Test interactive Perl examples

[ #36664 ]
I've wrote Test::Snippet.
http://svn.coderepos.org/share/lang/perl/Test-Snippet/trunk/

This is a port of Python's doctest.
doctest is : http://docs.python.org/lib/module-doctest.html

1. use your module at re.pl(Devel::REPL)
2. copy and paste to pod
3. run tests.

that's all.

follow is example code:

    your code here.

    =head1 NAME

    Acme::Test - testing acme

    =head1 DESCRIPTION

    blah blah blah

    =begin test

    $ 3+2
    5
    $ [2,5,5,{foo => 'bar'}]
    $ARRAY1 = [
                2,
                ( 5 ) x 2,
                { foo => 'bar' }
              ];

    =end test

    =cut

    something.. something..

    =head1 SEE ALSO

    ME!
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.