DOKK / manpages / debian 11 / libtest-inline-perl / Test::Inline::Extract.3pm.en
Test::Inline::Extract(3pm) User Contributed Perl Documentation Test::Inline::Extract(3pm)

Test::Inline::Extract - Extract relevant Pod sections from source code.

version 2.214

The Test::Inline::Extract package extracts content interesting to Test::Inline from source files.

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.

Returns a new "Test::Inline::Extract" object or "undef" on error.

  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".

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

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 bug-Test-Inline@rt.cpan.org <mailto: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.

2021-01-31 perl v5.32.0