GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HTTP::SimpleLinkChecker(3) User Contributed Perl Documentation HTTP::SimpleLinkChecker(3)

HTTP::SimpleLinkChecker - Check the HTTP response code for a link

THIS MODULE HAS BEEN ABANDONED. YOU CAN ADOPT IT https://pause.perl.org/pause/authenquery?ACTION=pause_04about#takeover

        use HTTP::SimpleLinkChecker;

        my $code = HTTP::SimpleLinkChecker::check_link($url);

        unless( defined $code ) {
                print "Error: $HTTP::SimpleLinkChecker::ERROR\n";
                }

You don't have to know anything about objected-oriented Perl, LWP, or the HTTP module to be able to check your links. This module is designed for the casual user. It has one function, "check_link", that returns the HTTP response code that it receives when it tries to fetch the web address passed to it. The undef value is returned for any non-HTTP failure and the $HTTP::SimpleLinkChecker::ERROR variable is set.

The HEAD method is tried first, although if anything other than a good status code (those less than 400) is received, another request is made with the GET method.

The user-agent will automatically handle redirects. If you don't like that, you can change the user agent settings before you start:

        HTTP::SimpleLinkChecker::user_agent()->max_redirects(0);

The user agent is Mojo::UserAgent, so anything you do with that module you can do with the user agent.

Note that even with the best code, no module can control how servers decide to respond to a check, or control any of the myriad things that can go wrong with the network between you and the remote server. Some may filter requests based on origin IP address, user-agent type, or any other arbitrary factor. Some servers may not respond correctly at all. Furthermore, some servers might be temporarily down or overloaded. I recommend that you recheck "broken" links a couple times over a long period (like a day or two) before you decide they are really broken.

If you are behind a firewall or proxy, this module picks up those settings through Mojo::UserAgent::Proxy's "detect()" method. See Mojo::UserAgent::Proxy for more details.

check_link( URL )
Returns the HTTP response code for URL.
user_agent
Returns a reference to the Mojo::UserAgent object. You can affect it directly. See Mojo::UserAgent.

        my $ua = HTTP::SimpleLinkChecker::user_agent();
        $ua->transactor->name( 'Mozilla 19.2' );
    

This source is in Github:

        https://github.com/briandfoy/http-simplelinkchecker

brian d foy, "<bdfoy@cpan.org>"

Sebastian Paaske Tørholm, "<Eckankar@gmail.com>"

Copyright © 2004-2021, brian d foy <bdfoy@cpan.org>. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

2021-02-03 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.