Test::Inline::Content::Simple(3pm)

Test::Inline::Content::Simple3pm

Simple templating content handler

Usage

  In your inline2test.tpl
  ----------------------
  #!/usr/bin/perl -w
  
  use strict;
  use Test::More [% plan %];
  $| = 1;
  
  
  
  [% tests %]
  
  
  
  1;

Version

version 2.214

Overview

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.

It contains only two tags, "plan" and "tests".

The "plan" tag will be inserted as either "tests =" 123> or 'no_plan'.

The "tests" tag will be replaced by the actual testing code.

Methods

new $filename

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.

template

The "template" accessor returns the template content for the object

process $Inline, $Script

The "process" method is unchanged from "Test::Inline::Content".

Support

See the main SUPPORT section.

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Inline> (or [email protected] <mailto:[email protected]>).

Releases

10 releases since Debian 4.0 (Etch); the text changed 6 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9–10
  7. 11–13

Author

Adam Kennedy <[email protected]>

From libtest-inline-perl 2.214-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.