man Test::Inline::Content::Simple () - Simple templating Content Handler
NAME
Test::Inline::Content::Simple - Simple templating Content Handler
SYNOPSIS
In your inline2test.tpl ---------------------- #!/usr/bin/perl -w
use strict; use Test::More [% plan %]; $| = 1;
[% tests %]
1;
DESCRIPTION
It is relatively common to want to customise the contents of the generated test files to set up custom environment things on an all-scripts basis, rather than file by file (using =begin SETUP blocks).
CWTest::Inline::Content::Simple lets you use a very simple Template Toolkit style template to define this information.
It contains only two tags, CWplan and CWtests.
The CWplan tag will be inserted as either CWtests = 123> or CW'no_plan'.
The CWtests tag will be replaced by the actual testing code.
METHODS
Manually create a new CWTest::Inline::Content::Simple object. Takes as parameter a single filename which should contain the template code.
Returns a new CWTest::Inline::Content::Simple object, or CWundef on error.
template
The CWtemplate accessor returns the template content for the object The CWprocess method is unchanged from CWTest::Inline::Content.
SUPPORT
See the main SUPPORT section.
AUTHOR
Adam Kennedy <cpan@ali.as>, <http://ali.as/>
COPYRIGHT
Copyright (c) 2004 - 2005 Phase N Austalia. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.