chklinks Version 3.09
Author: imacat
Keywords: link checker, broken links

正體中文 | 简体中文 | English

:::

# `chklinks` Version 3.09

## What’s New?

2007-12-06

  `chklinks` version 3.09 is released. Fixed the bug on systems like MS-Windows that does not have `getpwuid()`. Download `chklinks` version 3.09.

2007-12-05

  `chklinks` version 3.08 is released. There are several documentation fixes. Download `chklinks` version 3.08.

2007-12-05

  `chklinks` version 3.07 is released. Required Perl version number compatible to older versions, to work with the Perl 5.10 warning. License updated to GPLv3. Download `chklinks` version 3.07.

2007-06-08

  `chklinks` version 3.06 is released. Test suite fixes. Download `chklinks` version 3.06.

2007-06-07

  `chklinks` version 3.05 is released. Fixed problem with Perl version earlier than 5.8 where UTF-8 mode is not available. Download `chklinks` version 3.05.

2007-06-06

  `chklinks` version 3.04 is released. Documentation fixes. Download `chklinks` version 3.04.

2007-06-06

  `chklinks` version 3.03 is released. Fixed the raw UTF-8 warning with `HTML::Parser`. Added support for building with `Module::Build`. Download `chklinks` version 3.03.

2006-06-02

  `chklinks` version 3.02 is released. The digital signature is corrected. Download `chklinks` version 3.02.

2006-05-31

  `chklinks` version 3.01 is released. This fixed a missing prerequisites in `Makefile.PL`. HTML documents are returned. Download `chklinks` version 3.01.

2006-05-30

  `chklinks` version 3.00 is released. It uses `HTML::LinkExtor` to parse the page and `LWP::RobotUA` to make requests. More URL schemes other than `http` are supported. Cookies are supported. `robots.txt` rules are respected. Download `chklinks` version 3.00.

2005-10-02

  Website style adjustment. WCAG Accessibility designs are added. `<hr />`s are replaced by CSS borders for accessibility reason.

2005-04-27

  The text 繁體中文 on the website is corrected to 正體中文.

2003-05-26

  `chklinks` version 2.02 is released. The default changed from one-level to recursive. This is more desirable in most cases. Download `chklinks` version 2.02.

2003-05-25

  `chklinks` version 2.01 is released. An installer, accessary files and a POD document are added. Download `chklinks` version 2.01.

2003-05-25

  `chklinks` version 2.0.0 is released. This is the first public release uploaded onto SourceForge. Only the main script file is available. Download `chklinks` version 2.0.0.

2003-05-19

  SourceForge project space approved.

2003-05-18

  Requesting a SourceForge project space.

## Description

`chklinks` is a non-threaded Perl link checker. It helps finding broken links on your website.

`chklinks` differs from `linkchecker` in that `chklinks` is non-threaded. It does not raises many simultaneously connections for its job. It won’t run out of the resources and crash your system in a moment. This is certainly more desirable for most webmasters and users.

`chklinks` follows `robots.txt` rules. If you disallow robots from your website and experience problems, you need to allow `chklinks`. Add the following lines to your `robots.txt` file to allow `chklinks`:

>     User-agent: chklinks
>     Disallow:

`chklinks` uses `LWP::RobotUA` and support the following schemes: `http`, `https`, `ftp`, `gopher` and `file`. You can also specify a local file. (To use `https`, you need to install `Crypt::SSLeay`. This is the requirement of `LWP::RobotUA`.)

`chklinks` supports cookies.

## System Requirement

1. Perl, version 5.6 or above. I have not successfully run this on earlier versions. Please tell me if you can. You can run `perl -v` to see your current Perl version. Perl is distributed with most Unix now. If not, or if you have an older version of Perl, you can download and install/upgrade it from Perl website. If you are using MS-Windows, you can download and install ActiveState ActivePerl.

2. Required Perl modules:

   `URI`

     This is used to parse and process the found URLs. ActivePerl MS-Windows users can install this using `ppm install URI`.

   `HTML::LinkExtor`

     This is used to extract links from the web pages. `HTML::LinkExtor` is part of the HTML-Parser package. ActivePerl MS-Windows users can install this using `ppm install HTML::LinkExtor`.

   `LWP::RobotUA`

     This is used to request web pages. `LWP::RobotUA` is part of the libwww-perl package. ActivePerl MS-Windows users can install this using `ppm install LWP::RobotUA`.

   You can always search, download and install the missing Perl modules from the the CPAN archive.

3. Optional Perl modules:

   `Crypt::SSLeay`

     This is needed for `LWP::RobotUA` to support HTTPS. ActivePerl does not ship PPM builds on `Crypt::SSLeay` due to the Canadian Federal Government requirement. However, ActivePerl MS-Windows users can still install from other repositories, using `ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd`.

   You can always search, download and install the missing Perl modules from the the CPAN archive.

## Download

`chklinks`’s official websites is at…

- `chklinks` web site at SourceForge.

- `chklinks` project page at SourceForge.

- `chklinks` project page at CPAN.

- `chklinks` page at Tavern IMACAT’s.

You can always download the newest version of `chklinks` from…

- `chklinks` download page at SourceForge.

- `chklinks`’s project page at CPAN.

- Tavern IMACAT’s FTP directory.

imacat’s PGP public key is at…

- imacat’s PGP key at `chklinks` SourceForge web site.

- imacat’s PGP key at Tavern IMACAT’s.

## Install

### Install with `ExtUtils::MakeMaker`

`chklinks` uses standard Perl installation with `ExtUtils::MakeMaker`. Follow these steps:

>     % perl Makefile.PL
>     % make
>     % make test
>     % make install

When running `make install`, make sure you have the priviledge to write to the instalation location. This usually requires the `root` priviledge.

If you are using ActivePerl under MS-Windows, you should use `nmake` instead of `make`. `nmake` can be obtained from the Microsoft FTP site.

If you want to install into another location, you can set the `PREFIX`. For example, to install into your home when you are not `root`:

>     % perl Makefile.PL PREFIX=/home/jessica

Refer to the docuemntation of `ExtUtils::MakeMaker` for more installation options (by running `perldoc ExtUtils::MakeMaker`).

### Install with `Module::Build`

You can install with `Module::Build` instead, if you prefer. Follow these steps:

>     % perl Build.PL
>     % ./Build
>     % ./Build test
>     % ./Build install

When running `./Build install`, make sure you have the priviledge to write to the instalation location. This usually requires the `root` priviledge.

If you want to install into another location, you can set the `--prefix`. For example, to install into your home when you are not `root`:

>     % perl Build.PL --prefix=/home/jessica

Refer to the docuemntation of `Module::Build` for more installation options (by running `perldoc Module::Build`).

## Options

    ./chklinks [options] URL1 [URL2 [URL3 …]]
    ./chklinks [-h|-v]

-1,--onelevel

  Check the links on this page and stops.

-r,--recursive

  Recursively check through this website. This is the default.

-b,--below

  Only check the links below this directory. This is the default.

-p,--parent

  Trace back to the parent directories.

-l,--local

  Only check the links on this same host.

-s,--span

  Check the links to other hosts (without recursion). This is the default.

-e,--exclude path

  Exclude this path. Check for their existence but not check the links on them, just like they are on a foreign site. Multiple `--exclude` are OK.

-i,--include path

  Include this path. An opposite of `--exclude` that cancels its effect. The latter specified has a higher priority.

-d,--debug

  Display debug messages. Multiple `--debug` to debug more.

-q,--quiet

  Disable debug messages. An opposite that cancels the effect of `--debug`.

-h, --help

  Display the help message and exit.

-v, --version

  Output version information and exit.

URL1, URL2, URL3

  The URLs of the websites to check against.

## Notes

- `chklinks` does not obey `Crawl-delay:` in `robots.txt` yet. This is a problem in `WWW::RobotRules`, but not `chklinks` itself.

- If you encounter warnings like this:

  >     Parsing of undecoded UTF-8 will give garbage when decoding entities at /usr/share/perl5/LWP/Protocol.pm line 114.

  This is an issue of `LWP::Protocol` version ≤ 1.43 (in `libwww-perl` version ≤ 5.805) when working with `HTML::Parser` version ≥ 3.40 and Perl version ≥ 5.8. This issue is solved in `LWP::Protocol` version ≥ 1.46 (in `libwww-perl` version ≥ 5.806). You can upgrade your `LWP::Protocol` to the current version. If you cannot upgrade it, see CPAN RT Bug#20274 for an `LWP::Protocol` patch on this.

## See Also

`LWP::UserAgent`, `LWP::RobotUA`, `WWW::RobotRules`, `URI`, `HTML::LinkExtor`, Bastian Kleineidam’s `linkchecker` and W3C-LinkChecker `checklink`.

## Copyright

Copyright © 2003-2007 imacat. All rights reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see `<http://www.gnu.org/licenses/>`.

## Release Notes

Please read the `NEWS` for the new functions and bug fixes.

## Support

`chklinks` is hosted on SourceForge, CPAN and Tavern IMACAT’s. For the latest infomation, see

- `chklinks` web site at SourceForge.

- `chklinks` project page at SourceForge.

- `chklinks` project page at CPAN.

- `chklinks` page at Tavern IMACAT’s.

There is a `chklinks` mailing list hosted at SourceForge. Please submit your questions, suggestions or bug reports there. It is a Mailman mailing list. For more information, see the `chklinks` mailing list page. Alternatively, you can send a mail to the e-mail command mailbox with the subject `help` for a list of available e-mail commands.