Test::R...nternet(3)
πΈ NAME πΈ
okay bestie, you're looking at Test::R...nternet(3), which lives under User Contributed Perl Documentation. the module is Test::RequiresInternet, and its whole thing is: easily test network connectivity. π
like, no cap, that's the name and the purpose. periodt.
β¨ VERSION β¨
version 0.05 β that's the version, bestie. π
π«Ά SYNOPSIS π«Ά
use Test::More;
use Test::RequiresInternet ('www.example.com' => 80, 'foobar.io' => 25);
# if you reach here, sockets successfully connected to hosts/ports above
plan tests => 1;
ok(do_that_internet_thing());
so if you reach here, the sockets successfully connected to the hosts/ports above β that's the comment in the code, and it's true, bestie. π
π OVERVIEW π
okay so this module is intended to easily test network connectivity before functional tests begin to non-local Internet resources. It does not require any modules beyond those supplied in core Perl. iconic. β¨
If you do not specify a host/port pair, then the module defaults to using www.google.com on port 80. π
You may optionally specify the port by its name, as in http or ldap. If you do this, the test module will attempt to look up the port number using getservbyname. π§
If you do specify a host and port, they must be specified in pairs.
It is a fatal error to omit one or the other. π fr fr, don't do it.
If the environment variable NO_NETWORK_TESTING is set, then the tests will be skipped without attempting any socket connections. π
If the sockets cannot connect to the specified hosts and ports, the exception is caught, reported and the tests skipped. π
π AUTHOR π
Mark Allen <mrallen1@yahoo.com> β the author, the legend. π«Ά
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2014 by Mark Allen. π
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. πΈ
and that's the tea, bestie π«Ά this page is from perl v5.42.0, dated 2015-06-07, and yes, it's the Test::R...nternet(3) manual β bye, slay, go test your sockets. πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Test-RequiresInternet 0.05-160000.2.2 Β· Artistic-1.0 or GPL-1.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms