Test::Inline::Handler::Extract - Extract relevant Pod sections from source code.
The Test::Inline::Handler::Extract package uses PPI to extract and merge all POD from a source file. It then seperates out the sections that are relevant to Test::Inline.
Test::Inline
The new constructor creates a new Extract object. It is passed either a file name from which the source code would be loaded, or a reference to a string that directly contains source code.
new
Returns a new Test::Inline::Handler::Extract object or undef on error.
Test::Inline::Handler::Extract
undef
my $elements = $Extract->elements;
The elements method extracts from the Pod any parts of the file that are relevant to the extraction and generation process of Test::Inline.
elements
The elements will be either a package statements, or a section of inline unit tests. They will only be returned if there is at least one section of inline unit tests.
Returns a reference to an array of package strings and sections of inline unit tests. Returns false if there are no sections containing inline unit tests.
- For certain very complex cases, add a more intensive alternative parser based on PPI and/or POD::Parser
See the main SUPPORT section.
Adam Kennedy (Maintainer), http://ali.as/, cpan@ali.as
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.
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.