Test::Inline::Content::Simple - Simple templating Content Handler
version 2.214
In your inline2test.tpl ---------------------- #!/usr/bin/perl -w use strict; use Test::More [% plan %]; $| = 1; [% tests %] 1;
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).
Test::Inline::Content::Simple lets you use a very simple Template Toolkit style template to define this information.
Test::Inline::Content::Simple
It contains only two tags, plan and tests.
plan
tests
The plan tag will be inserted as either tests = 123> or 'no_plan'.
tests =
'no_plan'
The tests tag will be replaced by the actual testing code.
Manually create a new Test::Inline::Content::Simple object. Takes as parameter a single filename which should contain the template code.
Returns a new Test::Inline::Content::Simple object, or undef on error.
undef
The template accessor returns the template content for the object
template
The process method is unchanged from Test::Inline::Content.
process
Test::Inline::Content
See the main SUPPORT section.
Bugs may be submitted through the RT bug tracker (or bug-Test-Inline@rt.cpan.org).
Adam Kennedy <adamk@cpan.org>
This software is copyright (c) 2003 by Adam Kennedy.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Test::Inline, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Inline
CPAN shell
perl -MCPAN -e shell install Test::Inline
For more information on module installation, please visit the detailed CPAN module installation guide.