Test::Pod::Snippets

Description

Test::Pod::Snippets is a Perl module to generate tests from pod code snippets. SYNOPSIS use Test::Pod::Snippets; my $tps = Test::Pod::Snippets->new(); $tps->generate_snippets( @pm_and_pod_files ); Fact 1 In a perfect world, a modules full API should be covered by an extensive battery of testcases neatly tucked in the distributions t/ directory. But then, in a perfect world each backyard would have a marshmallow tree and postmen would consider their duty to circle all the real good deals in pamphlets before stuffing them in your mailbox. Obviously, were not living in a perfect world. Fact 2 Typos and minor errors in module documentation. Lets face it: it happens to everyone. And while its never the end of the world and is prone to rectify itself in time, its always kind of embarassing. A little bit like electronic zits on prepubescent docs, if you will. Test::Pod::Snippetss goal is to address those issues. Quite simply, it extracts verbatim text off pod documents -- which it assumes to be code snippets -- and generate test files out of them. HOW TO USE TEST::POD::SNIPPETS IN YOUR DISTRIBUTION If you are using Module::Build, add the following to your Build.PL: my $builder = Module::Build->new( # ... your M::B parameters PL_files => { script/test-pod-snippets.PL => q{} }, add_to_cleanup => [ t/pod-snippets-*.t ], ); Then create the file script/test-pod-snippets.PL, which should contains use Test::Pod::Snippets; my $tps = Test::Pod::Snippets->new; $tps->generate_snippets( qw# lib/your/module.pm lib/your/documentation.pod #); And youre set! Running Build should now generate one test file for each given module. If you prefer to generate the tests yourself, skip the modifications to Build.PL and call test-pod-snippets.PL from the distributions main directory..

Testpodsnippets - In A Perfect World - Perl Module - Generate - Pod - Module - Code - Tests - World - Libraries - Programming

Published By:Yanick Champoux

License Type:Freeware

Date Added:26 October, 2010

Version:0.02

Price:Free

Downloads:16

Size:6.1 KB

Platform: Linux

What people say
- required fields
     
Related Downloads

Data::Encrypted is a Perl module to transparently store encrypted data via RSA. SYNOPSIS # functional interface: use Data::Encrypted file => "./.

DateAug 12, 2010

AuthorAaron J Mackey

Size7.2 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

XML::Generator::vCard is a Perl module that can generate SAX2 events for vCard 3.

DateOct 4, 2010

AuthorAaron Straup Cope

Size7.2 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

WWW::Webrobot::pod::Testplan is a Perl module that helps you on how to write a test plan for webrobot. A test plan is a list of elements. An element itself may be a request, a (sub) test plan, an include or a cookie control command.

DateAug 25, 2010

AuthorABAS Software AG

Size98.3 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

Test::Stochastic is a Perl module to check probabilities of randomized methods. SYNOPSIS use Test::Stochastic qw(stochastic_ok); stochastic_ok sub { ...random sub...}, {a => 0.4, b => 0.6}; stochastic_ok {a => 0.4, b => 0.

DateAug 26, 2010

AuthorAbhijit Mahabal

Size4.1 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

Games::SGF::Tournament is a Perl module for tournament statistics generator.

DateOct 6, 2010

AuthorAl Nikolov

Size12.3 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming