Personal tools
Skip to content. | Skip to navigation
Test::Requires checks to see if the module can be loaded. If this fails, rather than failing tests this skips all tests.
This package provides the bulk of the core testing facilities. For more information, see perldoc for Test::Simple, Test::More, etc. This package is the CPAN component of the dual-lifed core package Test-Simple.
Test::TypeTiny module.
If you've ever tried to use Test::NoWarnings to confirm there are no warnings generated by your tests, combined with the convenience of done_testing to not have to declare a test count, you'll have discovered that these two features do not play well together, as the test count will be calculated before the warnings test is run, resulting in a TAP error (see examples/test_nowarnings.pl in this distribution for a demonstration). This module is intended to be used as a drop-in replacement for Test::NoWarnings: it also adds an extra test, but runs this test before done_testing calculates the test count, rather than after. It does this by hooking into done_testing as well as via an END block. You can declare a plan, or not, and things will still Just Work. It is actually equivalent to: use Test::NoWarnings 1.04 ':early'; as warnings are still printed normally as they occur. You are safe, and enthusiastically encouraged, to perform a global search-replace of the above with use Test::Warnings; whether or not your tests have a plan.
These Perl subroutines may be used to extract a delimited substring, possibly after skipping a specified prefix string.
Text::Diff provides a basic set of services akin to the GNU diff utility. It is not anywhere near as feature complete as GNU diff, but it is better integrated with Perl and available on all platforms. It is often faster than shelling out to a system's diff executable for small files, and generally slower on larger files.
Text::Glob implements glob(3) style matching that can be used to match against text, rather than fetching names from a file-system. If you want to do full file globbing use the File::Glob module instead.
The nested_quotewords() and quotewords() functions accept a delimiter (which can be a regular expression) and a list of lines and then breaks those lines up into a list of words ignoring delimiters that appear inside quotes. quotewords() returns all of the tokens in a single long list, while nested_quotewords() returns a list of token lists corresponding to the elements of @lines. parse_line() does tokenizing on a single string. The quotewords() functions simply call &parse_line(), so if you're only splitting one line you can call parse_line() directly and save a function call.
Text::Tabs performs the same job that the UNIX expand(1) and unexpand(1) commands do: adding or removing tabs from a document. Text::Wrap::wrap() will reformat lines into paragraphs. All it does is break up long lines, it will not join short lines together.
This is a library for generating form letters, building HTML pages, or filling in templates generally. A 'template' is a piece of text that has little Perl programs embedded in it here and there. When you 'fill in' a template, you evaluate the little programs and replace them with their values.