Test::...Extract(3pm)
π Test::Inline::Extract β the manual, but make it cute
okay bestie, so this is the page for Test::Inline::Extract(3pm) β it lives in the User Contributed Perl Documentation and honestly? it's giving "small module, big job". Let's get into it. π¦
β¨ NAME β¨
Test::Inline::Extract β it pulls the relevant Pod sections out of your source code. That's the whole vibe. π
πΈ VERSION πΈ
version 2.214 β yes, that's the number, no cap.
π DESCRIPTION π
So the Test::Inline::Extract package goes through source files and extracts the content that's interesting to Test::Inline. That's it. That's the job. It's a little content-picker-upper and it slays at it. β¨
π«Ά METHODS π«Ά
π§ new $file | \$source
The new constructor makes you a shiny new Extract object. You hand it either:
- a file name, and the source code gets loaded from there, or
- a reference to a string that directly contains the source code.
It returns a new Test::Inline::Extract object β or undef if something went wrong. π (yes, undef on error, that's the deal.)
π elements
my $elements = $Extract->elements;
The elements method reaches into the Pod and extracts any parts of the file that matter to the extraction and generation process of Test::Inline.
These elements are gonna be either package statements, or a section of inline unit tests. And here's the lil rule: they only come back to you if there's at least one section of inline unit tests. No tests, no elements, periodt. π
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. Not undef, not an empty arrayref β false. iykyk.
π TO DO π
- For certain very complex cases, add a more intensive alternative parser based on PPI.
(so that's a future-vibe thing, not a current-vibe thing, don't come for me)
π 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, if you're feeling email-y, to bug-Test-Inline@rt.cpan.org <mailto:bug-Test-Inline@rt.cpan.org>.
β AUTHOR β
Adam Kennedy <adamk@cpan.org> β the icon, the legend, the one who wrote this.
π COPYRIGHT AND LICENSE π
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. free as in free, bestie. π«Ά
that's the whole page, every flag, every fact, every undef, all of it. nothing skipped, nothing invented. π
this was perl v5.32.0, dated 2021-01-31, from the Test::...Extract(3pm) page β mwah, go forth and extract responsibly β¨π
πΈ
π¦ where this page comes from
- debian bookworm: libtest-inline-perl 2.214-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libtest-inline-perl 2.214-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libtest-inline-perl 2.214-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libtest-inline-perl 2.214-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtest-inline-perl 2.214-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtest-inline-perl 2.214-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms