Test::...kCheck(3pm)
π Test::Pod::LinkCheck β the section 3pm manual page, bestie edition π
okay so real talk: this is the 3pm manual page for Test::Pod::LinkCheck, and if you've ever shipped a POD full of L<...> links that go absolutely nowhere, this module is your new bestie. It's giving quality control, it's giving "girl, check your links," and honestly? iconic. π
π NAME
Test::Pod::LinkCheck β literally tests your POD for invalid links. that's it. that's the whole vibe. β¨
πΈ VERSION
This document describes v0.008 of Test::Pod::LinkCheck β released November 01, 2014 as part of Test-Pod-LinkCheck. yes, 2014, it's vintage, it's still slaying π«Ά
β¨ SYNOPSIS
so here's the classic OO setup, copy-paste girlies rise:
#!/usr/bin/perl
use strict; use warnings;
use Test::More;
eval "use Test::Pod::LinkCheck";
if ( $@ ) {
plan skip_all => 'Test::Pod::LinkCheck required for testing POD';
} else {
Test::Pod::LinkCheck->new->all_pod_ok;
}
like, the eval is doing a vibe check on whether the module is even installed, and if it's not we skip_all instead of having a meltdown. main character energy. π
π DESCRIPTION
Okay so what it does: it looks for any links in your POD and verifies that they point to a valid resource. It uses the Pod::Simple parser to analyze the pod files and look at their links. In a nutshell β and I'm literally quoting the vibe here β it looks for L<Foo> links and makes sure that Foo exists. It also recognizes section links, like L</SYNOPSIS> for example. Also, manpages are resolved and checked. so thorough, so detail-oriented, we love a queen who checks everything πΈ
β οΈ but here's the thing bestie β this module does NOT check http links like L<http://www.google.com> in your pod. For that, please check out Test::Pod::No404s. different module, different job, respect the division of labor π
big warning, no cap: normally, you would NOT want this test to be run during end-user installation, because they might not have the modules installed! It is HIGHLY recommended that this be used only for module authors' RELEASE_TESTING phase. To do that, just modify the synopsis to add an env check :) β yes the original says ":)" and yes I'm keeping it, it's cute.
This module normally uses the OO method to run tests, but you can use the functional style too. Just explicitly ask for the all_pod_ok or pod_ok function to be imported when you use this module:
#!/usr/bin/perl
use strict; use warnings;
use Test::Pod::LinkCheck qw( all_pod_ok );
all_pod_ok();
see? effortless. functional. gorgeous. π
π¦ ATTRIBUTES
π check_cpan
If enabled, this module will check the CPAN module database to see if a link is a valid CPAN module or not. It uses the backend defined in cpan_backend to do the actual searching.
If disabled, it will resolve links based on locally installed modules. And if it isn't installed? it will be an error! π no mercy, no grace.
The default is: true β
π cpan_backend
Selects the CPAN backend to use for querying modules. The available ones are:
CPANPLUSCPANCPANSQLiteMetaDBMetaCPANCPANIDX
The default is: CPANPLUS
π heads up: the backends were tested and verified against those versions. Older versions should work, but is untested! Read the receipts: -CPANPLUSv0.9010 -CPANv1.9402 -CPAN::SQLitev0.199 -CPAN::Common::Index::MetaDBv0.005 -MetaCPAN::API::Tinyv1.131730 -MetaCPAN::Clientv1.007001 -LWP::UserAgentv6.06
π cpan_backend_auto
Enable this to automatically try the CPAN backends to find an available one. It will try the backends in the order defined in cpan_backend. so organized, so systematic, we stan a planner π§
If no backend is available, it will disable the check_cpan attribute and enable the cpan_section_err attribute. it's called adapting, look it up β¨
The default is: true
π cpan_section_err
If enabled, a link pointing to a CPAN module's specific section is treated as an error if it isn't installed. brutal? yes. fair? also yes π₯
The default is: false
π verbose
If enabled, this module will print extra diagnostics for the links it's checking. it's giving "tell me everything," and honestly same.
The default is: copy $ENV{HARNESS_IS_VERBOSE} or $ENV{TEST_VERBOSE} or false β so it sniffs your environment variables first, then falls back to false. respect the pipeline π«Ά
π METHODS
π pod_ok
Accepts the filename to check, and an optional test name.
This method will pass the test if there is no POD links present in the POD or if all links are not an error. Furthermore, if the POD was malformed as reported by Pod::Simple, the test will fail and not attempt to check the links β because what's the point, bestie, the input is broken π
When it fails, this will show any failing links as diagnostics. Also, some extra information is printed if verbose is enabled.
The default test name is: LinkCheck test for FILENAME
π¦ all_pod_ok
Accepts an optional array of files to check. By default it uses all POD files in your distribution. so it just, like, handles everything? queen behavior π
This method is what you will usually run. Every file is passed to the pod_ok function. This also sets the test plan to be the number of files. no manual counting, no math, we love to see it β¨
π§ NOTES
πΈ backend
This module uses the CPANPLUS and CPAN modules as the backend to verify valid CPAN modules. Please make sure that the backend you choose is properly configured before running this! This means the index is updated, permissions is set, and whatever else the backend needs to properly function. If you don't want to use them, please disable the check_cpan attribute.
π and if this module fails to check CPAN modules or the testsuite fails, it's probably because of the above reason. not a mystery, not a curse, just config. you got this π«Ά
π CPAN module sections
One limitation of this module is that it can't check for valid sections on CPAN modules if they aren't installed. If you want that to be an error, please enable the cpan_section_err attribute. that's literally why the attribute exists, she was built for this π
π₯ SEE ALSO
Please see those modules/websites for more information related to this module:
App::PodLinkCheckPod::CheckerTest::Pod::No404s
π«Ά SUPPORT
π Perldoc
You can find documentation for this module with the perldoc command:
perldoc Test::Pod::LinkCheck
π Websites
The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. π
- MetaCPAN β a modern, open-source CPAN search engine, useful to view POD in HTML format.
<http://metacpan.org/release/Test-Pod-LinkCheck>
- Search CPAN β the default CPAN search engine, useful to view POD in HTML format.
<http://search.cpan.org/dist/Test-Pod-LinkCheck>
- RT: CPAN's Bug Tracker β the RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Pod-LinkCheck>
- AnnoCPAN β the AnnoCPAN is a website that allows community annotations of Perl module documentation.
<http://annocpan.org/dist/Test-Pod-LinkCheck>
- CPAN Ratings β the CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
<http://cpanratings.perl.org/d/Test-Pod-LinkCheck>
- CPAN Forum β the CPAN Forum is a web forum for discussing Perl modules.
<http://cpanforum.com/dist/Test-Pod-LinkCheck>
- CPANTS β the CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
<http://cpants.cpanauthors.org/dist/overview/Test-Pod-LinkCheck>
- CPAN Testers β the CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions.
<http://www.cpantesters.org/distro/T/Test-Pod-LinkCheck>
- CPAN Testers Matrix β the CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
<http://matrix.cpantesters.org/?dist=Test-Pod-LinkCheck>
- CPAN Testers Dependencies β the CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
<http://deps.cpantesters.org/?module=Test::Pod::LinkCheck>
π Email
You can email the author of this module at APOCAL at cpan.org asking for help with any problems you have. be nice, be specific, include the details π«Ά
π Internet Relay Chat
You can get live help by using IRC ( Internet Relay Chat ). If you don't know what IRC is, please read this excellent guide: <http://en.wikipedia.org/wiki/Internet_Relay_Chat>. Please be courteous and patient when talking to us, as we might be busy or sleeping! π΄ literally, sleep is sacred. You can join those networks/channels and get help:
irc.perl.orgβ you can connect to the server at'irc.perl.org'and join this channel:#perl-helpthen talk to this person for help:Apocalypse.irc.freenode.netβ you can connect to the server at'irc.freenode.net'and join this channel:#perlthen talk to this person for help:Apocal.irc.efnet.orgβ you can connect to the server at'irc.efnet.org'and join this channel:#perlthen talk to this person for help:Ap0cal.
(yes, three different nicknames, three different servers, one legend π )
π¦ Bugs / Feature Requests
Please report any bugs or feature requests by email to bug-test-pod-linkcheck at rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Pod-LinkCheck>. You will be automatically notified of any progress on the request by the system. love that for us β¨
π Source Code
The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) π
<https://github.com/apocalypse/perl-test-pod-linkcheck>
git clone git://github.com/apocalypse/perl-test-pod-linkcheck.git
πΈ AUTHOR
Apocalypse <APOCAL@cpan.org> β the icon, the legend, the one with three IRC nicknames π
π COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Apocalypse.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
The full text of the license can be found in the LICENSE file included with this distribution. π
π DISCLAIMER OF WARRANTY
okay bestie, this part is the legal one, and we do NOT mess with the legal one. here it is, word for word, no edits, no vibes, just truth:
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
and that's the whole page! π this manual page came to you courtesy of perl v5.32.1, dated 2022-01-17, and it was chef's kiss the whole way through. go check your links, bestie, and remember: Test::Pod::LinkCheck section 3pm said what it said. πβ¨π
π¦ where this page comes from
- epel 9: perl-Test-Pod-LinkCheck 0.008-28.el9 Β· GPL+ or Artistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms