Initial commit.

This commit is contained in:
依瑪貓 2021-02-05 22:43:13 +08:00
commit a5c281b7e3
36 changed files with 4842 additions and 0 deletions

1
AUTHORS Normal file
View File

@ -0,0 +1 @@
imacat <imacat@mail.imacat.idv.tw>

1
AUTHORS.zh-cn Normal file
View File

@ -0,0 +1 @@
ÒÀÂêè <imacat@mail.imacat.idv.tw>

1
AUTHORS.zh-tw Normal file
View File

@ -0,0 +1 @@
¨Ìº¿¿ß <imacat@mail.imacat.idv.tw>

35
Build.PL Executable file
View File

@ -0,0 +1,35 @@
#! /usr/bin/perl -w
# Build.PL: Installation configuration for Module::Build
use strict;
use warnings;
use Module::Build;
my $build = Module::Build->new(
dist_name => "chklinks",
dist_version_from => "chklinks",
dist_abstract => "A non-threaded Perl link checker",
dist_author => "imacat <imacat\@mail.imacat.idv.tw>",
license => "gpl",
sign => 1,
script_files => [ "chklinks" ],
requires => {
"perl" => "5.6.0",
"URI" => 0,
"LWP::RobotUA" => 0,
"HTTP::Cookies" => 0,
"HTTP::Request" => 0,
"HTML::LinkExtor" => 0
},
recommends => {
"Crypt::SSLeay" => 0,
},
build_requires => {
"Module::Signature" => 0,
"Test::Pod" => 0,
},
);
$build->create_build_script;
__END__

674
COPYING Normal file
View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
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.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

261
Changes Normal file
View File

@ -0,0 +1,261 @@
chklinks change log
2008-11-18
1. INSTALL: Fixed the grammer on installation with the CPAN or
CPANPLUS shell, changed "install with the CPAN shell using"
and "install with the CPANPLUS shell using" to "install it
with the CPAN shell by running" and "install it with the
CPANPLUS shell by running".
2. chklinks.en.html: Updated information on required and optional
Perl modules, to describe different installation commands for
different operating systems.
3. INSTALL and chklinks.en.html: Changed "Fedora/Red Hat" to
"Red Hat/Fedora/CentOS".
4. chklinks.zh-tw.html and chklinks.zh-cn.html: Removed
Date::Parse from the required modules. It is a mistake when
copying text from arclog.
5. INSTALL.zh-tw, INSTALL.zh-cn, chklinks.zh-tw.html and
chklinks.zh-cn.html: Updated information on required and
optional Perl modules, to describe different installation
commands for different operating systems.
2008-11-17
1. INSTALL: Updated information on required and optional Perl
modules, to describe different installation commands for
different operating systems.
2. INSTALL: Fixed the grammer on the notes that required modules
are automatically installed if install from the CPAN or
CPANPLUS shell.
2. chklinks.en.html: Fixed the grammer of the required modules,
changed "is part of the xxx package" to "is contained in the
xxx distribution".
2008-04-21
1. INSTALL and chklinks.en.html: Fixed typo: "instalation" to
"installation".
2007-12-05 version 3.09
MS-Windows fix.
1. chklinks: Fixed the "from" address of the user agent to use
getlogin() and then getpwuid(), in order to work on systems
that only have getlogin() but not getpwuid(), like MS-Windows.
2007-12-05 version 3.08
Documentation fixes.
1. README.zh-*, chklinks.zh-*.html: Fixed the description
"是用 Perl 寫的單執行緒連結檢查程式" to "是單執行緒的 Perl 連結
檢查程式", according to the existing short description in
README.zh-tw. I was out of my mind to miss this and translate
it again.
2. chklinks.zh-tw.html, chklinks.zh-cn.html: Removed the old
excess LWP/UTF-8 paragraph from the Notes section.
3. chklinks.en.html: Fixed "for a LWP::Protocol patch" to
"for an LWP::Protocol patch".
4. README.en: Fixed "LWP::RobotUA(3)" to "LWP::RobotUA".
5. README*: Updated the LWP/UTF-8 information.
6. chklinks.*.html: Fixed the support section, replacing all
instances of "arclog" to "chklinks". It is terrible that I just
copied and pasted without reviewing.
2007-12-05 version 3.07
1. chklinks.*.html: Refer to NEWS instead of Changes for release
notes.
2. README*, chklinks.*.html: Fixed the description "is a Perl link
checker" to "is a non-threaded Perl link checker".
3. chklinks, README, Build.PL, Makefile.PL: Fixed the short
description "perl link checker" to "Perl link checker".
2007-12-04
1. Makefile.PL: Fixed to prevent importing symbols when
checking optional prerequisites.
2007-12-03
1. Makefile.PL, Build.PL: Added comment on the short description of
this file to the beginning of the file.
2. Makefile.PL, Build.PL: Added "use warnings;".
2007-12-01
1. chklinks, Makefile.PL: Use "use 5.006" instead of "use 5.6.0",
for compatibility with older Perl, and get ride of the warning
of Perl 5.10.
2007-11-27
1. chklinks.zh-tw.html, chklinks.zh-cn.html: Tag the languages.
2007-11-26
1. License updated to GPLv3.
2. chklinks.*.html: Added version number to the title.
3. chklinks.zh-cn.html: Fixed the quotation style.
4. fdl.txt: Updated (FSF address).
5. MSWin32 and MS-Win32 is now written as MS-Windows in the
documentation.
6. Build.PL: Added "recommends" and "build_requires".
2007-11-25
1. chklinks.en.html, INSTALL: Fixed the typo "archieve" as "archive".
2007-11-22
1. chklinks: Fixed $SIG{__WARN__} to $SIG{"__WARN__"} in the
parse_args() subroutine.
2. chklinks: Removed the Chinese GPL copyright message. There should
only be one version of the copyright message, and should not be
any Chinese comment.
2007-06-08 version 3.06
Test suite updates
1. t/01-basic.t: Added test 21 to check if we have exhausted all
the results, and remove the found URL after test 15-20, in
order to catch errors in the test suites.
2007-06-07
1. chklinks.en.html, chklinks.zh-tw.html, chklinks.zh-cn.html:
Added missing <samp>...</samp> around WWW::RobotRules in the
Notes chapter.
2. INSTALL: Filled in the missing text in the System Requirements
chapter.
2. chklinks.zh-cn.html: Added blank line in the News chapter.
2007-06-07 version 3.05
1. chklinks: Do not set $parser->utf8_mode(1) in get_links() when
Perl version is earlier than 5.8 where UTF-8 mode is not
available.
2. INSTALL, INSTALL.zh-tw, INSTALL.zh-cn: Added instruction on
installation with Module::Build.
3. INSTALL.zh-tw, INSTALL.zh-cn: Fixed several typos.
4. chklinks.en.html: Added instruction on installation with
Module::Build.
5. chklinks.zh-tw.html, chklinks.zh-cn.html: Added illustration
instruction that was missing previously.
6. t/htdocs/dir01/test01.html: Added http://www.domain.invalid/
and ftp://ftp.domain.invalid/.
7. t/01-basic.t: Added test on http://www.domain.invalid/ and
ftp://ftp.domain.invalid/.
8. t/htdocs/dir01/start.html: Changed to UTF-8, and added an
UTF-8 Chinese paragraph in order to test UTF-8 mode.
2007-06-06 version 3.04
Documentation fixes.
1. Changes: Added detailed change log entries about the new Notes
chapter of the POD document.
2. chklinks.en.html: Fixed an unencoded <p> in the HTML.
3. chklinks.zh-tw.html: Removed the extra white space in the front
of the news text.
4. chklinks.en.html, chklinks.zh-tw.html, chklinks.zh-cn.html: Added
Module::Build support to 3.03 news text.
2007-06-06 version 3.03
1. chklinks: Added "$parser->utf8_mode(1);" in get_links(), to
fix the HTML::Parser raw UTF-8 warning when extracting links from
UTF-8 HTML content with HTML::Parser version >= 3.40. Thanks
to nsnake <loveme1314@gmail.com> for reporting this problem.
2. Build.PL: Added, to support building with Module::Build.
3. chklinks: Added a new chapter "Notes" in the POD document. Moved
the illustration on Crawl-delay: from the Bugs chapter to the
Notes chapter of the POD document.
4. chklinks: Added illustration of CPAN RT Bug#20274 on LWP::Protocol
with HTML::Parser 3.40+ to the Notes chapter of the POD document.
2006-07-20
1. chklinks: Replaced getlogin() with getpwuid(). getlogin() many
not always be available, for example, when running from
crontab.
2006-06-08
1. chklinks: Revised the code with my own coding standard.
2. Changes: ChangeLog renamed to Changes, in order to follow Perl's
convention.
2006-06-01 version 3.02
1. SIGNATURE: Fixed. Added the missing META.yml.
2. Fixes in HTML documents.
2006-05-31 version 3.01
1. HTML documents were missing in version 3.00. I have put them
back. I have also made a lot of changes, including Web
Accessibility updates.
2. chklinks: Updated $UASTR to use $LWP::VERSION when
LWP::RobotUA->_agent() is not available. LWP::RobotUA->_agent()
is only available after libwww-perl version 5.53_91. (It's
2001-04-20, though.)
3. chklinks: Use File::Spec instead of File::Spec::Functions.
File::Spec is more compatible in older versions.
4. Several translated Chinese documents are added.
2006-05-30
1. ChangeLog: Added the forgotten version number.
2. Makefile.PL: Added the missing prerequisites LWP::RobotUA,
HTTP::Cookies and HTTP::Request. Removed Net::HTTP that is not
used anymore.
3. chklinks: Removed the prerequisite Net::HTTP. It is not used
anymore.
2006-05-30 version 3.00
1. Documentation fixes.
2006-05-29
1. Fixed the usage in usage help from chklinks.pl to chklinks. Fixed
the help text from "check for" to "check against".
2. Change the name fetch_doc_redir() to fetch_redir() and
fetch_doc_noredir() to fetch_noredir().
3. t/00-signature.t and 99-pod.t: added.
4. t/htdocs: a simple test suite is created. t/01-basic.t is rewritten
to use that test suite.
2006-05-28
1. Use warn() instead of print STDERR in warnings.
2. Added %ALLOWED_SCHEMES, with 5 protocols supported: http, https,
ftp, file and gopher, which are supported protocols common to LWP
and URI.
3. parse_args() and proc_link_val(): Modified to respect
%ALLOWED_SCHEMES instead of filtering out everything but HTTP.
4. check_links(): Fixed the comment from
"We will never parse the remote documents" to
"We are not parsing remote documents".
5. Removed unnecessary scalar() in parse_args() and check_links().
6. parse_args(): Updated the warning, change
"Skipping scheme-less URI" to "Skipping URI without a scheme",
change "Skipping hostless URI" to "Skipping URI without a host".
7. Use LWP::RobotUA to make request instead of making HTTP request
myself. Added fetch_doc_noredir(), fetch_doc_redir(), get_ua()
and get_target() to replace fetch_http(), fetch_http_redir(),
new_http() and re_http().
8. Changed User-Agent text from chklinks/version to
chklinks-robot/version.
9. Use HTTP::Cookies to save and use the cookies. As $COOKIE_JAR
as the common cookie jar for all the UA objects.
10. Added noreq_key() and %NOREQ_HOSTS to prevent bothering servers
that are not available and returning HTTP 503.
11. Support file:// scheme gracefully. Added rep_uri() to report
the file:// URI gracefully. Currently tested on Linux and
MSWin32. More tests required.
12. Moved chklinks from bin directory to the source root.
2006-05-27
1. Add the prototype declaration.
2. Use HTML::LinkExtor to parse and extract the links in an HTML
page, instead of parsing it myself.
2003-05-26 version 2.02
1. The default changed from onelevel to recursive. This is more
desirable in most cases.
2. Documentation fixes.
3. The chklinks website is done.
4. 01-basic.t: File::Spec is used instead of File::Spec::Functions,
in order to work with perl 5.005.
5. PGP key added.
6. HTML documents added.
7. Chinese GPL (both simplified and traditional) are added.
8. FDL added.
2003-05-25 version 2.01
1. An installer, accessary files and a POD document are added.
2003-05-25 version 2.0.0
1. First public release uploaded onto SourceForge.
Only the main script file is available.
2003-05-19
1. SourceForge project space approved.
2003-05-18
1. Requesting a SourceForge project space.

166
INSTALL Normal file
View File

@ -0,0 +1,166 @@
chklinks Installation Guide
* Table of Contents
* System Requirements
* Installation Instruction
** Install with ExtUtils::MakeMaker
** Install with Module::Build
* System Requirements
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.
http://www.perl.com/
If you are using MS-Windows, you can download and install
ActiveState ActivePerl.
http://www.activestate.com/
2. Required Perl modules:
* URI
This is used to parse and process the found URLs.
You can download and install URI from the CPAN archive
http://search.cpan.org/dist/URI/ ,
or install it with the CPAN shell by running "cpan URI",
or install it with the CPANPLUS shell by running
"cpanp i URI".
Debian/Ubandu Linux users can install it by running
"apt-get install liburi-perl".
Red Hat/Fedora/CentOS Linux users can install it by running
"yum install perl-URI".
FreeBSD users can install it by running
"ports install p5-URI".
ActivePerl users can install it by running
"ppm install URI".
* HTML::LinkExtor
This is used to extract links from the web pages.
HTML::LinkExtor is contained in the HTML-Parser distribution.
You can download and install HTML::LinkExtor from the CPAN archive
http://search.cpan.org/dist/HTML-Parser/ ,
or install it with the CPAN shell by running "cpan HTML::LinkExtor",
or install it with the CPANPLUS shell by running
"cpanp i HTML::LinkExtor".
Debian/Ubandu Linux users can install it by running
"apt-get install libhtml-parser-perl".
Red Hat/Fedora/CentOS Linux users can install it by running
"yum install perl-HTML-Parser".
FreeBSD users can install it by running
"ports install p5-HTML-Parser".
ActivePerl users can install it by running
"ppm install HTML::LinkExtor".
* LWP::RobotUA
This is used to request web pages.
LWP::RobotUA is contained in the libwww-perl distribution.
You can download and install LWP::RobotUA from the CPAN archive
http://search.cpan.org/dist/libwww-perl/ ,
or install it with the CPAN shell by running "cpan LWP::RobotUA",
or install it with the CPANPLUS shell by running
"cpanp i LWP::RobotUA".
Debian/Ubandu Linux users can install it by running
"apt-get install libwww-perl".
Red Hat/Fedora/CentOS Linux users can install it by running
"yum install perl-libwww-perl".
FreeBSD users can install it by running
"ports install p5-libwww".
ActivePerl users can install it by running
"ppm install LWP::RobotUA".
If you install chklinks with the CPAN or CPANPLUS shell, the above
shall be automatically installed.
3. Optional Perl modules:
* Crypt::SSLeay
This is needed for LWP::RobotUA to support HTTPS.
You can download and install Crypt::SSLeay from the CPAN archive
http://search.cpan.org/dist/Crypt-SSLeay/ ,
or install it with the CPAN shell by running "cpan Crypt::SSLeay",
or install it with the CPANPLUS shell by running
"cpanp i Crypt::SSLeay".
Debian/Ubandu Linux users can install it by running
"apt-get install libcrypt-ssleay-perl".
Red Hat/Fedora/CentOS Linux users can install it by running
"yum install perl-Crypt-SSLeay".
FreeBSD users can install it by running
"ports install p5-Crypt-SSLeay".
ActiveState does not host the PPM build of Crypt::SSLeay for
ActivePerl due to the Canadian Federal Government requirement.
However, ActivePerl users can still install it from another
repository, by running
"ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd"
* Installation Instruction
** 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 installation 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.
ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe
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 installation 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).
imacat
2008-11-17
imacat@mail.imacat.idv.tw
http://www.imacat.idv.tw/

153
INSTALL.zh-cn Normal file
View File

@ -0,0 +1,153 @@
chklinks 安装指南
◎目录
◎系统需求
◎安装指南
◎◎以 ExtUtils::MakeMaker 安装
◎◎以 Module::Build 安装
◎系统需求
1. Perl 5.6 或以上。我还没有在更早的版本上成功执行过。若你可以在更
早的版本上执行,请告诉我。你可以输入 perl -v 查询你目前的 Perl 版本。
目前大多数的 Unix 系统都有 Perl 。如果你没有 Perl 或需要升级,可以到
Perl 网站下载安装最新版 Perl 。
http://www.perl.com/
若你是用 MS-Windows ,可以下载安装 ActiveState 公司的 ActivePerl 。
http://www.activestate.com/
2. 需搭配的 Perl 模组:
* URI
这是解析、处理网址用的。
你可以由 CPAN 模组库下载安装 URI
http://search.cpan.org/dist/URI/
或用 CPAN Shell 执行 cpan URI 安装,
或用 CPANPLUS Shell 执行 cpanp i URI 安装。
若你是 Debian/Ubandu Linux 使用者,可以执行
apt-get install liburi-perl 安装。
若你是 Red Hat/Fedora/CentOS Linux 使用者,可以执行
yum install perl-URI 安装。
若你是 FreeBSD 使用者,可以执行
ports install p5-URI 安装。
若你是 ActivePerl 使用者,可以执行
ppm install URI 安装。
* HTML::LinkExtor
这是由网页里找出连结用的。
HTML::LinkExtor 为 HTML-Parser 中的模组。
你可以由 CPAN 模组库下载安装 HTML::LinkExtor
http://search.cpan.org/dist/HTML-Parser/
或用 CPAN Shell 执行 cpan HTML::LinkExtor 安装,
或用 CPANPLUS Shell 执行 cpanp i HTML::LinkExtor 安装。
若你是 Debian/Ubandu Linux 使用者,可以执行
apt-get install libhtml-parser-perl 安装。
若你是 Red Hat/Fedora/CentOS Linux 使用者,可以执行
yum install perl-HTML-Parser 安装。
若你是 FreeBSD 使用者,可以执行
ports install p5-HTML-Parser 安装。
若你是 ActivePerl 使用者,可以执行
ppm install HTML::LinkExtor 安装。
* LWP::RobotUA
这是抓取网页用的。
LWP::RobotUA 为 libwww-perl 中的模组。
你可以由 CPAN 模组库下载安装 LWP::RobotUA
http://search.cpan.org/dist/libwww-perl/
或用 CPAN Shell 执行 cpan LWP::RobotUA 安装,
或用 CPANPLUS Shell 执行 cpanp i LWP::RobotUA 安装。
若你是 Debian/Ubandu Linux 使用者,可以执行
apt-get install libwww-perl 安装。
若你是 Red Hat/Fedora/CentOS Linux 使用者,可以执行
yum install perl-libwww-perl 安装。
若你是 FreeBSD 使用者,可以执行
ports install p5-libwww 安装。
若你是 ActivePerl 使用者,可以执行
ppm install LWP::RobotUA 安装。
若你由 CPAN 或 CPANPLUS Shell 安装 chklinks ,会自动帮你安装以
上所需的模组。
3. 选配的 Perl 模组:
* Crypt::SSLeay
这是读取设定档用的。
你可以由 CPAN 模组库下载安装 Crypt::SSLeay
http://search.cpan.org/dist/Crypt-SSLeay/
或用 CPAN Shell 执行 cpan Crypt::SSLeay 安装,
或用 CPANPLUS Shell 执行 cpanp i Crypt::SSLeay 安装。
若你是 Debian/Ubandu Linux 使用者,可以执行
apt-get install libcrypt-ssleay-perl 安装。
若你是 Red Hat/Fedora/CentOS Linux 使用者,可以执行
yum install perl-Crypt-SSLeay 安装。
若你是 FreeBSD 使用者,可以执行
ports install p5-Crypt-SSLeay 安装。
因加拿大联邦政府的规定, ActiveState 公司无法提供 Crypt::SSLeay
的 ActivePerl PPM 套件安装。不过若你是 ActivePerl 使用者,还是
可以改由其它套件库,执行
ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd
安装。
◎安装指南
◎◎以 ExtUtils::MakeMaker 安装
chklinks 用 Perl 标准的 ExtUtils::MakeMaker 安装,程序如下:
% perl Makefile.PL
% make
% make test
% make install
在 make install 前,请先确认你有在安装目录存档的权限。通常这时候
要切换为 root ,才能安装存档。
若你是用 MS-Windows 下的 ActivePerl make 请改用 nmake 。 nmake
可由微软的 FTP 站下载:
ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe
若要安装到其它地方,请设定好 PREFIX 。例如,一般使用者,要安装在
自己的目录下时:
% perl Makefile.PL PREFIX=/home/jessica
要知道更多安装选项的细节,请参阅 ExtUtils::MakeMaker 的说明(请执
行 perldoc ExtUtils::MakeMaker )。
◎◎以 Module::Build 安装
若你喜欢,也可以用 Module::Build 安装,程序如下:
% perl Build.PL
% ./Build
% ./Build test
% ./Build install
在 ./Build install 前,请先确认你有在安装目录存档的权限。通常这时
候要切换为 root ,才能安装存档。
若要安装到其它地方,请设定好 --prefix 。例如,一般使用者,要安装
在自己的目录下时:
% perl Build.PL --prefix=/home/jessica
要知道更多安装选项的细节,请参阅 Module::Build 的说明(请执行
perldoc Module::Build )。
依玛猫 imacat ^_*'
2008-11-18
imacat@mail.imacat.idv.tw
http://www.imacat.idv.tw/

153
INSTALL.zh-tw Normal file
View File

@ -0,0 +1,153 @@
chklinks 安裝指南
◎目錄
◎系統需求
◎安裝指南
◎◎以 ExtUtils::MakeMaker 安裝
◎◎以 Module::Build 安裝
◎系統需求
1. Perl 5.6 或以上。我還沒有在更早的版本上成功執行過。若妳可以在更
早的版本上執行,請告訴我。妳可以輸入 perl -v 查詢妳目前的 Perl 版本。
目前大多數的 Unix 系統都有 Perl 。如果妳沒有 Perl 或需要昇級,可以到
Perl 網站下載安裝最新版 Perl 。
http://www.perl.com/
若妳是用 MS-Windows ,可以下載安裝 ActiveState 公司的 ActivePerl 。
http://www.activestate.com/
2. 需搭配的 Perl 模組:
* URI
這是解析、處理網址用的。
妳可以由 CPAN 模組庫下載安裝 URI
http://search.cpan.org/dist/URI/
或用 CPAN Shell 執行 cpan URI 安裝,
或用 CPANPLUS Shell 執行 cpanp i URI 安裝。
若妳是 Debian/Ubandu Linux 使用者,可以執行
apt-get install liburi-perl 安裝。
若妳是 Red Hat/Fedora/CentOS Linux 使用者,可以執行
yum install perl-URI 安裝。
若妳是 FreeBSD 使用者,可以執行
ports install p5-URI 安裝。
若妳是 ActivePerl 使用者,可以執行
ppm install URI 安裝。
* HTML::LinkExtor
這是由網頁裏找出連結用的。
HTML::LinkExtor 為 HTML-Parser 中的模組。
妳可以由 CPAN 模組庫下載安裝 HTML::LinkExtor
http://search.cpan.org/dist/HTML-Parser/
或用 CPAN Shell 執行 cpan HTML::LinkExtor 安裝,
或用 CPANPLUS Shell 執行 cpanp i HTML::LinkExtor 安裝。
若妳是 Debian/Ubandu Linux 使用者,可以執行
apt-get install libhtml-parser-perl 安裝。
若妳是 Red Hat/Fedora/CentOS Linux 使用者,可以執行
yum install perl-HTML-Parser 安裝。
若妳是 FreeBSD 使用者,可以執行
ports install p5-HTML-Parser 安裝。
若妳是 ActivePerl 使用者,可以執行
ppm install HTML::LinkExtor 安裝。
* LWP::RobotUA
這是抓取網頁用的。
LWP::RobotUA 為 libwww-perl 中的模組。
妳可以由 CPAN 模組庫下載安裝 LWP::RobotUA
http://search.cpan.org/dist/libwww-perl/
或用 CPAN Shell 執行 cpan LWP::RobotUA 安裝,
或用 CPANPLUS Shell 執行 cpanp i LWP::RobotUA 安裝。
若妳是 Debian/Ubandu Linux 使用者,可以執行
apt-get install libwww-perl 安裝。
若妳是 Red Hat/Fedora/CentOS Linux 使用者,可以執行
yum install perl-libwww-perl 安裝。
若妳是 FreeBSD 使用者,可以執行
ports install p5-libwww 安裝。
若妳是 ActivePerl 使用者,可以執行
ppm install LWP::RobotUA 安裝。
若妳由 CPAN 或 CPANPLUS Shell 安裝 chklinks ,會自動幫妳安裝以
上所需的模組。
3. 選配的 Perl 模組:
* Crypt::SSLeay
這是讀取設定檔用的。
妳可以由 CPAN 模組庫下載安裝 Crypt::SSLeay
http://search.cpan.org/dist/Crypt-SSLeay/
或用 CPAN Shell 執行 cpan Crypt::SSLeay 安裝,
或用 CPANPLUS Shell 執行 cpanp i Crypt::SSLeay 安裝。
若妳是 Debian/Ubandu Linux 使用者,可以執行
apt-get install libcrypt-ssleay-perl 安裝。
若妳是 Red Hat/Fedora/CentOS Linux 使用者,可以執行
yum install perl-Crypt-SSLeay 安裝。
若妳是 FreeBSD 使用者,可以執行
ports install p5-Crypt-SSLeay 安裝。
因加拿大聯邦政府的規定, ActiveState 公司無法提供 Crypt::SSLeay
的 ActivePerl PPM 套件安裝。不過若妳是 ActivePerl 使用者,還是
可以改由其它套件庫,執行
ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd
安裝。
◎安裝指南
◎◎以 ExtUtils::MakeMaker 安裝
chklinks 用 Perl 標準的 ExtUtils::MakeMaker 安裝,程序如下:
% perl Makefile.PL
% make
% make test
% make install
在 make install 前,請先確認妳有在安裝目錄存檔的權限。通常這時候
要切換為 root ,才能安裝存檔。
若妳是用 MS-Windows 下的 ActivePerl make 請改用 nmake 。 nmake
可由微軟的 FTP 站下載:
ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe
若要安裝到其它地方,請設定好 PREFIX 。例如,一般使用者,要安裝在
自己的目錄下時:
% perl Makefile.PL PREFIX=/home/jessica
要知道更多安裝選項的細節,請參閱 ExtUtils::MakeMaker 的說明(請執
行 perldoc ExtUtils::MakeMaker )。
◎◎以 Module::Build 安裝
若妳喜歡,也可以用 Module::Build 安裝,程序如下:
% perl Build.PL
% ./Build
% ./Build test
% ./Build install
在 ./Build install 前,請先確認妳有在安裝目錄存檔的權限。通常這時
候要切換為 root ,才能安裝存檔。
若要安裝到其它地方,請設定好 --prefix 。例如,一般使用者,要安裝
在自己的目錄下時:
% perl Build.PL --prefix=/home/jessica
要知道更多安裝選項的細節,請參閱 Module::Build 的說明(請執行
perldoc Module::Build )。
依瑪貓 imacat ^_*'
2008-11-18
imacat@mail.imacat.idv.tw
http://www.imacat.idv.tw/

36
MANIFEST Normal file
View File

@ -0,0 +1,36 @@
AUTHORS
AUTHORS.zh-cn
AUTHORS.zh-tw
Build.PL
Changes
chklinks
chklinks.en.html
chklinks.zh-cn.html
chklinks.zh-tw.html
COPYING
fdl.txt
INSTALL
INSTALL.zh-cn
INSTALL.zh-tw
Makefile.PL
MANIFEST This list of files
META.yml
NEWS
pgpkey.asc
README
README.zh-cn
README.zh-tw
SIGNATURE
t/00-signature.t
t/01-basic.t
t/99-pod.t
t/htdocs/dir01/start.html
t/htdocs/dir01/test01.html
t/htdocs/stylesheets/test.css
t/htdocs/test03.html
THANKS
THANKS.zh-cn
THANKS.zh-tw
TODO
TODO.zh-cn
TODO.zh-tw

18
META.yml Normal file
View File

@ -0,0 +1,18 @@
--- #YAML:1.0
name: chklinks
version: 3.09
abstract: A non-threaded Perl link checker
license: gpl
author:
- imacat <imacat@mail.imacat.idv.tw>
generated_by: ExtUtils::MakeMaker version 6.38
distribution_type: module
requires:
HTML::LinkExtor: 0
HTTP::Cookies: 0
HTTP::Request: 0
LWP::RobotUA: 0
URI: 0
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.3.html
version: 1.3

46
Makefile.PL Executable file
View File

@ -0,0 +1,46 @@
#! /usr/bin/perl -w
# Makefile.PL: Installation configuration for ExtUtils::MakeMaker
use 5.006;
use strict;
use warnings;
use ExtUtils::MakeMaker;
# Optional prerequisite modules
use vars qw(%OPT_PREREQ);
%OPT_PREREQ = (
"Crypt::SSLeay" => 0,
);
delete $OPT_PREREQ{$_}
foreach grep eval "use $_ $OPT_PREREQ{$_} qw(); 1;", sort keys %OPT_PREREQ;
if (keys %OPT_PREREQ > 0) {
$_ = join " ", sort keys %OPT_PREREQ;
warn << "EOT";
-- Optional Prerequisites
You may wish to install these modules altogether.
$_
EOT
}
WriteMakefile(
NAME => "chklinks",
VERSION_FROM => "chklinks",
ABSTRACT => "A non-threaded Perl link checker",
AUTHOR => "imacat <imacat\@mail.imacat.idv.tw>",
LICENSE => "gpl",
PREREQ_PM => {
"URI" => 0,
"LWP::RobotUA" => 0,
"HTTP::Cookies" => 0,
"HTTP::Request" => 0,
"HTML::LinkExtor" => 0,
},
SIGN => 1,
EXE_FILES => [ "chklinks" ],
dist => {
COMPRESS => "gzip -9",
SUFFIX => ".gz",
},
);
__END__

56
NEWS Normal file
View File

@ -0,0 +1,56 @@
New in 3.09:
* Fixed the bug on systems like MS-Windows that does not have
getpwuid().
New in 3.08:
* Documentation fixes.
New in 3.07:
* Required Perl version number compatible to older versions, to work
with the Perl 5.10 warning.
* License updated to GPLv3.
* Documentation fixes.
New in 3.06:
* Test suite fixes.
New in 3.05:
* Fixed the problem with Perl version earlier than 5.8 where
UTF-8 mode is not available.
New in 3.04:
* Documentation fixes.
New in 3.03:
* Fixed the raw UTF-8 warning with HTML::Parser >= 3.40.
* Added Build.PL to support Module::Build.
New in 3.02:
* Digital signature corrected.
* Fixes in HTML document.
New in 3.01:
* Bug fixes.
* HTML documents are returned.
New in 3.00:
* chklinks follows robots.txt rules now. 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 now uses LWP::RobotUA and support the following schemes in
addition to http: http, https, ftp, gopher, file. You can also specify a
local file. (To use https, you need to install Crypt::SSLeay.)
* Cookies are supported now.
New in 2.02:
* The default changed from one-level to recursive. This is more
desirable in most cases.
New in 2.01:
* An installer, accessary files and a POD document are added.
New in 2.0.0:

69
README Normal file
View File

@ -0,0 +1,69 @@
chklinks - A non-threaded Perl link checker.
Copyright (c) 2003-2007 imacat.
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/>.
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, file. You can also specify a local file.
(To use https, you need to install Crypt::SSLeay.)
chklinks supports cookies.
See INSTALL for instructions on how to install chklinks.
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 http://rt.cpan.org/Public/Bug/Display.html?id=20274
for an LWP::Protocol patch on this.
chklinks is hosted on SourceForge, CPAN and Tavern IMACAT's. For
the latest infomation, see:
* http://chklinks.sourceforge.net/
* http://sourceforge.net/projects/chklinks/
* http://search.cpan.org/dist/chklinks/
* http://www.imacat.idv.tw/tech/chklinks.html
Report bugs to imacat <imacat@mail.imacat.idv.tw>.
imacat
2007-12-05
imacat@mail.imacat.idv.tw
http://www.imacat.idv.tw/

64
README.zh-cn Normal file
View File

@ -0,0 +1,64 @@
chklinks - 单执行绪的 Perl 连结检查程式。
版权所有 (c) 2003-2007 依玛猫
本程式是自由软体,您可以遵照自由软体基金会 (Free Software Foundation)
出版的 GNU 通用公共许可证条款 (GNU General Public License) 第三版来修
改和重新发布这一程式,或者自由选择使用任何更新的版本。
发布这一程式的目的是希望它有用,但没有任何担保。甚至没有适合特定目的
而隐含的担保。更详细的情况请参阅 GNU 通用公共许可证。
您应该已经和程式一起收到一份 GNU 通用公共许可证的副本。如果还没有,参
阅<http://www.gnu.org/licenses/>。
chklinks 是单执行绪的 Perl 连结检查程式,用来检查网站上的超连结有
没有疏漏。
chklinks 和 linkchecker 不同之处在於chklinks 不是多执行绪的程式
。 chklinks 检查时,不会同时启动一大堆连线同步检查,耗尽系统资源,导致
当机。对大多数网管和使用者而言,这样做安全得多。
chklinks 遵守 robots.txt 设定的规则。若你的网站拒绝自动网页程式,
导致 chklinks 无法执行,请在你的 robots.txt ,加入下列两行,放行
chklinks
User-agent: chklinks
Disallow:
chklinks 使用 LWP::RobotUA 连线,支援下列通讯协定: http 、 https
、 ftp 、 gopher 及 file 。chklinks 也可以检查一般的档案。(若要使用
https 通讯协定,需先安装 Crypt::SSLeay 。这是 LWP::RobotUA 的需求。)
chklinks 支援网站的 Cookies 。
  请详阅 INSTALL.zh-tw 档案的安装指南。
  若出现以下警告:
Parsing of undecoded UTF-8 will give garbage when decoding
entities at /usr/share/perl5/LWP/Protocol.pm line 114.
  这是 LWP::Protocol 1.43 版或之前的版本( libwww-perl 5.805 版或之
前的版本),碰上 HTML::Parser 3.40 版或之后的版本及 Perl 5.8 版或之后
的版本时,产生的问题。 LWP::Protocol 1.46 版以后( libwww-perl 5.806
版以后),已解决这个问题。请升级到最新版的 LWP::Protocol 。若你因故无
法升级,请参阅 CPAN RT Bug#20274 报告
http://rt.cpan.org/Public/Bug/Display.html?id=20274 ,取得
LWP::Protocol 的修补程式。
chklinks 网站架在 SourceForge 、 CPAN 与 旅舍依玛。索取最新资讯,
请驾临:
* http://chklinks.sourceforge.net/
* http://sourceforge.net/projects/chklinks/
* http://search.cpan.org/dist/chklinks/
* http://www.imacat.idv.tw/tech/chklinks.html
错误问题请回报给依玛猫 <imacat@mail.imacat.idv.tw> 。
依玛猫 imacat ^_*'
2007-12-05
imacat@mail.imacat.idv.tw
http://www.imacat.idv.tw/

64
README.zh-tw Normal file
View File

@ -0,0 +1,64 @@
chklinks - 單執行緒的 Perl 連結檢查程式。
版權所有 (c) 2003-2007 依瑪貓
本程式是自由軟體,您可以遵照自由軟體基金會 (Free Software Foundation)
出版的 GNU 通用公共許可證條款 (GNU General Public License) 第三版來修
改和重新發佈這一程式,或者自由選擇使用任何更新的版本。
發佈這一程式的目的是希望它有用,但沒有任何擔保。甚至沒有適合特定目的
而隱含的擔保。更詳細的情況請參閱 GNU 通用公共許可證。
您應該已經和程式一起收到一份 GNU 通用公共許可證的副本。如果還沒有,參
閱<http://www.gnu.org/licenses/>。
chklinks 是單執行緒的 Perl 連結檢查程式,用來檢查網站上的超連結有
沒有疏漏。
chklinks 和 linkchecker 不同之處在於chklinks 不是多執行緒的程式
。 chklinks 檢查時,不會同時啟動一大堆連線同步檢查,耗盡系統資源,導致
當機。對大多數網管和使用者而言,這樣做安全得多。
chklinks 遵守 robots.txt 設定的規則。若妳的網站拒絕自動網頁程式,
導致 chklinks 無法執行,請在妳的 robots.txt ,加入下列兩行,放行
chklinks
User-agent: chklinks
Disallow:
chklinks 使用 LWP::RobotUA 連線,支援下列通訊協定: http 、 https
、 ftp 、 gopher 及 file 。chklinks 也可以檢查一般的檔案。(若要使用
https 通訊協定,需先安裝 Crypt::SSLeay 。這是 LWP::RobotUA 的需求。)
chklinks 支援網站的 Cookies 。
  請詳閱 INSTALL.zh-tw 檔案的安裝指南。
  若出現以下警告:
Parsing of undecoded UTF-8 will give garbage when decoding
entities at /usr/share/perl5/LWP/Protocol.pm line 114.
  這是 LWP::Protocol 1.43 版或之前的版本( libwww-perl 5.805 版或之
前的版本),碰上 HTML::Parser 3.40 版或之後的版本及 Perl 5.8 版或之後
的版本時,產生的問題。 LWP::Protocol 1.46 版以後( libwww-perl 5.806
版以後),已解決這個問題。請昇級到最新版的 LWP::Protocol 。若妳因故無
法昇級,請參閱 CPAN RT Bug#20274 報告
http://rt.cpan.org/Public/Bug/Display.html?id=20274 ,取得
LWP::Protocol 的修補程式。
chklinks 網站架在 SourceForge 、 CPAN 與 旅舍依瑪。索取最新資訊,
請駕臨:
* http://chklinks.sourceforge.net/
* http://sourceforge.net/projects/chklinks/
* http://search.cpan.org/dist/chklinks/
* http://www.imacat.idv.tw/tech/chklinks.html
錯誤問題請回報給依瑪貓 <imacat@mail.imacat.idv.tw> 。
依瑪貓 imacat ^_*'
2007-12-05
imacat@mail.imacat.idv.tw
http://www.imacat.idv.tw/

58
SIGNATURE Normal file
View File

@ -0,0 +1,58 @@
This file contains message digests of all files listed in MANIFEST,
signed via the Module::Signature module, version 0.55.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
% cpansign -v
It will check each file's integrity, as well as the signature's
validity. If "==> Signature verified OK! <==" is not displayed,
the distribution may already have been compromised, and you should
not run its Makefile.PL or Build.PL.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
SHA1 91ced1a733e7448edc19eab22482508d58d7b284 AUTHORS
SHA1 c4c98cc9e7ac5e119752587d0322280a7a71d205 AUTHORS.zh-cn
SHA1 eb60ee204fcf7244fc0774ac34d05a35a281e82b AUTHORS.zh-tw
SHA1 8f43b147c64db8e26b5d23d6bb24eb6657086cf7 Build.PL
SHA1 8624bcdae55baeef00cd11d5dfcfa60f68710a02 COPYING
SHA1 75aac7f77e344c5729399d323beea3013d43be2d Changes
SHA1 85511344983264b042b7c9908b583f9ffc2883b0 INSTALL
SHA1 6c76a11efb973c28843dd78cd733916d435486dc INSTALL.zh-cn
SHA1 3964e72811c189abdf0289115cbc6cbb5de02263 INSTALL.zh-tw
SHA1 60d324fbf0b35d11d8fd87987570cedbace38bd8 MANIFEST
SHA1 de90a1e81bfc43c237b52011ea2537a2436971fa META.yml
SHA1 6f0121c588264962273ca3b011f02e1c5ca4c9e3 Makefile.PL
SHA1 9a30816755a9c25da556ef89435544c3428849a4 NEWS
SHA1 d4ba36b2a1ecf22309d47666945c26b0f8f87e14 README
SHA1 ffdefa6237871eccdf1a1be0f52981b20db038b0 README.zh-cn
SHA1 f507818867704af42bdfb80d5d9752a186522015 README.zh-tw
SHA1 fe6cf3c3671ab077d29c6aeb64b9db9b26d107bb THANKS
SHA1 8e4323b6f056b6e3a93e7b3b0b30eb4bd249cd67 THANKS.zh-cn
SHA1 424427d2171109c68c241fc58784469ba7f0fa6b THANKS.zh-tw
SHA1 0cbe7f0abc164955d82d31e84a93d032ced8fd87 TODO
SHA1 96fd7c6f911a55c0a2592986c23a3c4e7c01afad TODO.zh-cn
SHA1 44fbd7b0e7dd71d7b5db32cdb04a32b1659eb02e TODO.zh-tw
SHA1 d91e0060e0bcc305fb4823ccc229f91e8c550a81 chklinks
SHA1 bd986dcd9826fa048b1f159908e282a893ae7585 chklinks.en.html
SHA1 25bf7528bfb773674a0fbb346e51e53b91231d21 chklinks.zh-cn.html
SHA1 ff354f25166b0783a3d23729ee1b379823b124e5 chklinks.zh-tw.html
SHA1 bd75d59f9d7d9731bfabdc48ecd19e704d218e38 fdl.txt
SHA1 520fdcf4374af210380db9e0fdaea44c904a15fc pgpkey.asc
SHA1 525f414c7a0aadc61240a4b0959ca2cda7514c75 t/00-signature.t
SHA1 c58eed31af883caea4c3f4d9f963c5057ffe47be t/01-basic.t
SHA1 b85626024d610808bd0909989dcfb9fb20a40485 t/99-pod.t
SHA1 44d1b4b0f06828f3408981ee63f6462ba0fdf1c9 t/htdocs/dir01/start.html
SHA1 daff57a412711803ed645c8f868dfec64b2e66d0 t/htdocs/dir01/test01.html
SHA1 55800ebcc4a0ac8583e763499f98660fff117f33 t/htdocs/stylesheets/test.css
SHA1 e1fc75f156071ee26e5892db26af16ddfaec3316 t/htdocs/test03.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFHVvLHi9gubzC5S1wRAo/eAJwKjrbrXSfx9KSbIivDK3rj2qauqwCeIWBl
uZXV8T7lGCfm3z4oKu8jBHo=
=F4t/
-----END PGP SIGNATURE-----

14
THANKS Normal file
View File

@ -0,0 +1,14 @@
Thanks to SourceForge to kindly provide hosting the reslog project.
Thanks to CPAN to kindly provide hosting the reslog project.
Thanks to SourceForge for providing compiling farm for projects
to test on different platforms.
Thanks to Stefan Seifert <stefan.seifert@atikon.com> for pointing
out redirection loops problem when cookies are not activated.
(2005-11-07)
Thanks to nsnake <loveme1314@gmail.com> for reporting warnings
from HTML::Parser version >= 3.40 when checking UTF-8 pages.
(2007-06-06)

11
THANKS.zh-cn Normal file
View File

@ -0,0 +1,11 @@
  感谢 SourceForge 提供架设 reslog 专案。
  感谢 CPAN 提供架设 reslog 专案。
  感谢 SourceForge 提供 compile farm 各种平台供专案测试。
  感谢 Stefan Seifert <stefan.seifert@atikon.com> 回报不支援 Cookies
时网页无限自我转向的问题。 (2005-11-07)
  感谢 nsnake <loveme1314@gmail.com> 回报检查 UTF-8 页面时,
HTML::Parser 3.40 版以上会出现警告讯息的问题。 (2007-06-06)

11
THANKS.zh-tw Normal file
View File

@ -0,0 +1,11 @@
  感謝 SourceForge 提供架設 reslog 專案。
  感謝 CPAN 提供架設 reslog 專案。
  感謝 SourceForge 提供 compile farm 各種平台供專案測試。
  感謝 Stefan Seifert <stefan.seifert@atikon.com> 回報不支援 Cookies
時網頁無限自我轉向的問題。 (2005-11-07)
  感謝 nsnake <loveme1314@gmail.com> 回報檢查 UTF-8 頁面時,
HTML::Parser 3.40 版以上會出現警告訊息的問題。 (2007-06-06)

16
TODO Normal file
View File

@ -0,0 +1,16 @@
* chklinks does not support authentication yet. W3C-LinkChecker
have support on this. As a workaround, You can use the syntax
http://user:pass@some.where.com/some/path for Basic Authentication,
but this does not work on Digest Authentication. This practice is
not encouraged, too. Your password would be visable to anyone on
this system using ps, including hidden intruders. Also what you
type in your shell will be saved to your shell history file.
* mailto: URLs should be supported by checking the validity of its
DNS/MX record.
* Local file checking has only been tested on Unix and MS-Windows.
More platforms should be tested, especially VMS and Mac.
* chklinks does not obey Crawl-delay: in robots.txt yet. This is a
problem in WWW::RobotRules, but not chklinks itself.

15
TODO.zh-cn Normal file
View File

@ -0,0 +1,15 @@
* chklinks 还不支援登入帐号密码的功能。 W3C-LinkChecker 有支援这个功能
。若不是 Digest 登入,只是 Basic 登入,你可以先用像是
http://user:pass@some.where.com/some/path 的语法登入。不过请不要这样
做。任何人只要用 ps 指令,就看得到密码。如果这时候系统有入侵者偷偷溜
进来,也可以看得到。而且这样写在指令中的密码,也会存在你的指令记录档
中。
* 应该可以支援 mailto: 的网址,检查其 DNS/MX 是否可用。 Bastian
Kleineidam 的 linkchecker 有支援这个功能。
* 一般档案的支援目前只在 Unix 和 MS-Windows 上测试过,还需要在其它作业
系统如 VMS 及 Mac 上测试能不能运作。
* chklinks 尚未遵守 robots.txt 的 Crawl-delay: 规则。不过这是
WWW::RobotRules 的问题,不是 chklinks 的问题。

15
TODO.zh-tw Normal file
View File

@ -0,0 +1,15 @@
* chklinks 還不支援登入帳號密碼的功能。 W3C-LinkChecker 有支援這個功能
。若不是 Digest 登入,只是 Basic 登入,妳可以先用像是
http://user:pass@some.where.com/some/path 的語法登入。不過請不要這樣
做。任何人只要用 ps 指令,就看得到密碼。如果這時候系統有入侵者偷偷溜
進來,也可以看得到。而且這樣寫在指令中的密碼,也會存在妳的指令記錄檔
中。
* 應該可以支援 mailto: 的網址,檢查其 DNS/MX 是否可用。 Bastian
Kleineidam 的 linkchecker 有支援這個功能。
* 一般檔案的支援目前只在 Unix 和 MS-Windows 上測試過,還需要在其它作業
系統如 VMS 及 Mac 上測試能不能運作。
* chklinks 尚未遵守 robots.txt 的 Crawl-delay: 規則。不過這是
WWW::RobotRules 的問題,不是 chklinks 的問題。

838
chklinks Executable file
View File

@ -0,0 +1,838 @@
#! /usr/bin/perl -w
# chklinks: A non-threaded Perl link checker
# Copyright (c) 2003-2007 imacat.
#
# 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/>.
# First written: 2003-04-12
use 5.006;
use strict;
use warnings;
use Config qw();
use Cwd qw(getcwd);
use File::Basename qw(basename);
use File::Spec qw();
use Getopt::Long qw(GetOptions);
use HTML::LinkExtor qw();
use HTTP::Request qw();
use HTTP::Cookies qw();
use LWP::RobotUA qw();
use Socket qw(inet_aton);
use Sys::Hostname qw(hostname);
use URI qw();
use URI::Escape qw(uri_escape uri_unescape);
# Prototype declaration
sub main();
sub parse_args();
sub check_links($);
sub fetch_redir($);
sub fetch_noredir($);
sub get_links($$);
sub proc_link_val($$);
sub is_excluded($);
sub get_ua($);
sub get_target($);
sub noreq_key($);
sub rep_uri($);
use vars qw($THIS_FILE $VERSION $VERBOSE);
$THIS_FILE = basename($0);
$VERSION = "3.09";
$VERBOSE = 1;
use vars qw(@STARTS $RECURSIVE $PARENT $NOREMOTE @EXCLUDES);
use vars qw($UASTR %UA %TARGETS %URIS %REFS $COOKIE_JAR);
use vars qw($LOCAL_TARGET @LOCALS %LFOUND $STARTDIR @REMOTES %RFOUND);
use vars qw($TOTAL $SUCCESS %NOREQ_HOSTS %ALLOWED_SCHEMES);
$UASTR = "$THIS_FILE-robot/$VERSION (using " . (LWP::RobotUA->can("_agent")?
LWP::RobotUA->_agent: "libwww-perl/" . $LWP::VERSION) . ")";
%UA = qw();
%TARGETS = qw();
%URIS = qw();
%REFS = qw();
$COOKIE_JAR = new HTTP::Cookies;
%NOREQ_HOSTS = qw();
$RECURSIVE = 1;
$PARENT = 0;
$NOREMOTE = 0;
@EXCLUDES = qw();
%ALLOWED_SCHEMES = map { $_ => 1 } qw(http https ftp file gopher);
use vars qw($VERMSG $SHORTHELP $HELPMSG);
$VERMSG = "$THIS_FILE v$VERSION by imacat <imacat\@mail.imacat.idv.tw>";
$SHORTHELP = "Try `$THIS_FILE --help' for more information.";
$HELPMSG = << "EOT";
Usage: $THIS_FILE [options] url1 [url2 [url3 ...]]
Check links on the specific website.
-1,--onelevel Check the links on this page and stops.
-r,--recursive Recursively check through this site. (default)
-b,--below Only check the links below this directory. (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).
(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 this help.
-v,--version Display version number.
url1,url2... The URLs of the websites to check against.
EOT
main;
exit 0;
# main: Main program
sub main() {
local ($_, %_);
# Parse the arguments
parse_args;
# Check each URL
check_links $_ foreach @STARTS;
print STDERR "Done. " . (time - $^T) . " seconds elapsed.\n"
if $VERBOSE > 0;
return;
}
# parse_args: Parse the arguments
sub parse_args() {
local ($_, %_);
# Get the arguments
eval {
local $SIG{"__WARN__"} = sub { die $_[0]; };
Getopt::Long::Configure(qw(no_auto_abbrev bundling));
GetOptions( "onelevel|1"=>sub { $RECURSIVE = 0; },
"recursive|r"=>sub { $RECURSIVE = 1; },
"below|b"=>sub { $PARENT = 0; },
"parent|p"=>sub { $PARENT = 1; },
"local|l"=>sub { $NOREMOTE = 1; },
"span|s"=>sub { $NOREMOTE = 0; },
"exclude|e=s"=>sub { unshift @EXCLUDES, "-" . $_[1]; },
"include|i=s"=>sub { unshift @EXCLUDES, "+" . $_[1]; },
"debug|d+"=>\$VERBOSE,
"quiet|q"=>sub { $VERBOSE-- if $VERBOSE > 0; },
"help|h"=>sub { print $HELPMSG; exit 0; },
"version|v"=>sub { print "$VERMSG\n"; exit 0; });
};
die "$THIS_FILE: $@$SHORTHELP\n" if $@ ne "";
# Show progress
$| = 1 if $VERBOSE > 2;
# Check the arguments
# Arguments are URLs
@STARTS = qw();
while (@ARGV > 0) {
my ($uri, $uritext);
$uritext = shift @ARGV;
$uri = new URI($uritext);
# Single letter scheme is assumed to be a volumn label
# This is for MSWin32
$uri->scheme(undef) if defined $uri->scheme && $uri->scheme =~ /^[a-z]$/i;
# URI without a scheme is assumed to be a local file
if (!defined $uri->scheme) {
# Systems with symbolic links -- rel2abs() is not trustworthy, use URI->abs().
if ($Config::Config{"d_symlink"}) {
my $base;
$base = getcwd;
$base =~ s/\/$//;
$base =~ s/^\///;
$base = new URI("file://localhost/$base/");
$uri = new URI(join("/", File::Spec->splitdir($uritext)));
$uri = $uri->abs($base);
# Systems without symbolic links -- we assume rel2abs() is trustworthy.
# Like MSWin32
} else {
$uri = new URI("file://localhost/" . join("/", File::Spec->splitdir(File::Spec->rel2abs($uritext))));
$uri->scheme("file");
$uri->host("localhost");
}
}
if (!exists $ALLOWED_SCHEMES{$uri->scheme}) {
warn "$THIS_FILE: WARNING: $uritext: Skipping URI with unsupported scheme " . $uri->scheme . "\n"
if $VERBOSE > 0;
next;
}
# file scheme is OK without a host -- it is localhost
if ($uri->scheme eq "file") {
$uri->host("localhost") if !defined $uri->host || $uri->host eq "";
if ($uri->host ne "localhost") {
warn "$THIS_FILE: WARNING: $uritext: Skipping file URI that is not on localhost\n"
if $uri->host ;
next;
}
# schemes other than file require a host
} else {
if (!defined $uri->host || $uri->host eq "") {
warn "$THIS_FILE: WARNING: $uritext: Skipping URI without a host\n"
if $VERBOSE > 0;
next;
}
}
if ($uri->path eq "") {
warn "$THIS_FILE: WARNING: $uritext: URI not canonical\n"
if $VERBOSE > 0;
$uri->path("/");
}
$uri->fragment(undef);
# Use its canonical form
$uri = $uri->canonical;
if (exists $URIS{$uri->as_string}) {
warn "$THIS_FILE: WARNING: Skipping duplicated URI $uritext\n"
if $VERBOSE > 0;
next;
}
$URIS{$uri->as_string} = $uri;
push @STARTS, $uri->as_string;
}
die "$THIS_FILE: Please specify the URL to check\n$SHORTHELP\n"
if @STARTS == 0;
return;
}
# check_links: Check links from an URL
sub check_links($) {
local ($_, %_);
my ($start, $page, $doc);
$start = $_[0];
@LOCALS = qw($start);
%LFOUND = ($start => 1);
$LOCAL_TARGET = get_target $start;
@REMOTES = qw();
($TOTAL, $SUCCESS) = (0, 0);
$STARTDIR = $URIS{$start}->path;
$STARTDIR =~ s/[^\/]+$//;
$page = $start;
($page, $doc) = fetch_redir $page;
return if !defined $doc;
get_links $doc, $page;
while (@LOCALS > 0 || @REMOTES > 0) {
# Always process locals first
if (@LOCALS > 0) {
@LOCALS = sort @LOCALS;
$page = $LOCALS[0];
($page, $doc) = fetch_redir $page;
# Skip the failed request
next if !defined $doc;
# Skip if non-recursive
next if !$RECURSIVE;
# Skip if it is excluded
next if is_excluded $page;
get_links $doc, $page;
# Then the remote
} else {
@REMOTES = sort @REMOTES;
$page = $REMOTES[0];
fetch_redir $page;
# We are not parsing remote documents
}
}
print rep_uri($start) . ": $TOTAL checked, $SUCCESS success\n"
if $VERBOSE > 0;
return;
}
# fetch_redir: Fetch a document and deal with redirection
sub fetch_redir($) {
local ($_, %_);
my ($orig, $redir, $doc, $referer);
$orig = $_[0];
while (1) {
($doc, $redir) = fetch_noredir $orig;
# No more redirection
return ($orig, $doc) if !defined $redir;
# Redirection target was scheduled
return ($orig, undef) if exists $LFOUND{$redir} || exists $RFOUND{$redir};
# Record the referer
$REFS{$redir} = [] if !exists $REFS{$redir};
$referer = [rep_uri $orig];
push @$referer, @{${$REFS{$orig}}[0]} if exists $REFS{$orig};
push @{$REFS{$redir}}, $referer;
# Process the next
$orig = $redir;
}
}
# fetch_noredir: Fetch a document without redirection
sub fetch_noredir($) {
my ($uritext, $uri, $ua, $r, $urirep);
$uritext = $_[0];
# Remove it from the list
if (get_target($uritext) eq $LOCAL_TARGET) {
shift @LOCALS;
} else {
shift @REMOTES;
}
# Set the target URI to report
$urirep = rep_uri $uritext;
$urirep .= " (Referer: " . join(", ", map join(" -> ", reverse @$_), @{$REFS{$uritext}}) . ")"
if exists $REFS{$uritext};
# Add the counter
$TOTAL++;
# Skip if this host has returned 503 Service Unavailable previously
if (exists $NOREQ_HOSTS{noreq_key $uritext}) {
$_ = $urirep;
$_ .= " skipped for service unavailable in previous request to "
. $NOREQ_HOSTS{noreq_key $uritext}
if $VERBOSE > 0;
print "$_\n";
return (undef, undef);
}
$uri = $URIS{$uritext};
print STDERR "Requesting $urirep... " if $VERBOSE > 2;
$ua = get_ua $uritext;
# HTTP or HTTPS -- use HTTP::Request for more sophisticated configuration
if ($uri->scheme =~ /^https?$/) {
my ($request, $w, $sigwarn);
$request = new HTTP::Request(GET => $uri->as_string);
# Set the referer
$request->header("Referer", ${${$REFS{$uritext}}[0]}[0])
if exists $REFS{$uritext};
# Gracefully deal with robots.txt warnings
$sigwarn = $SIG{"__WARN__"};
undef $w;
local $SIG{"__WARN__"} = sub { $w = $_[0]; };
$r = $ua->simple_request($request);
$SIG{"__WARN__"} = $sigwarn;
if (defined $w) {
# Malformed robots.txt warnings
if ($w =~ /^RobotRules <[^\n]+>: Unexpected line: /) {
# Skip malformed robots.txt warnings on remote sites
# We are assumed to have no control on the remote sites
if (get_target($uritext) ne $LOCAL_TARGET) {
# Skip warnings about Crawl-delay:
# As of writing this, WWW::RobotRules 1.33 in libwww-perl 5.805
# does not recognized the Crawl-delay: rule yet.
} elsif ($w =~ /^RobotRules <[^\n]+>: Unexpected line: Crawl-delay:/i) {
# Warn on malformed lines in our local robots.txt
} else {
warn $w;
}
# Other warnings
} else {
warn $w;
}
}
} else {
$r = $ua->get($uri->as_string);
}
print STDERR "OK\n" if $VERBOSE > 2;
# 204 No Content
if ($r->code == 204) {
$SUCCESS++;
return (undef, undef);
# 200 OK
} elsif ($r->code == 200) {
$SUCCESS++;
# Only return the body if text/html
# Fix the content type of XHTML in file URI
if ($uri->scheme eq "file" && $uri->as_string =~ /\.xhtml$/) {
$_ = "application/xhtml+xml";
# Parse the content type -- keep the last one when multiple
} else {
@_ = split /,\s*/, $r->header("Content-Type");
$_ = $_[$#_];
}
return ($r->content, undef)
if /^text\/html\b/ || /^application\/xhtml\+xml\b/;
return (undef, undef);
# 3XX Redirect
} elsif (grep($r->code == $_, (301, 302, 303, 307)) > 0) {
my ($is_full_uri, $ruri, $rtarget);
# Redirect without location is an error
if (!defined $r->header("Location")) {
print STDERR "$urirep " . $r->status_line . ": Redirect without location\n";
return (undef, undef);
}
$ruri = new URI($r->header("Location"));
# Deal with non-canonical location
$is_full_uri = 1;
# Non-absolute location should be warned
if (!defined $ruri->scheme) {
$is_full_uri = 0;
$ruri->scheme($uri->scheme);
}
# Skip schemes that are not supported
return (undef, undef) if !exists $ALLOWED_SCHEMES{$uri->scheme};
if (!defined $ruri->host || $ruri->host eq "") {
$is_full_uri = 0;
$ruri->host($uri->host);
}
if ($ruri->path eq "") {
$is_full_uri = 0;
$ruri->path("/");
}
warn "$THIS_FILE: WARNING: $uritext: " . $r->status_line . ": "
. "Location not canonical: " . $r->header("Location") . "\n"
if !$is_full_uri && $VERBOSE > 1;
$ruri->fragment(undef);
# Use its canonical form
$ruri = $ruri->canonical;
# Save it
$URIS{$ruri->as_string} = $ruri if !exists $URIS{$ruri->as_string};
# 301 Moved Permanently should be treated as an error, because we need
# to change the reference from now on.
if ($r->code == 301) {
$_ = $urirep;
$_ .= " " . $r->status_line . ": " . $ruri->as_string
if $VERBOSE > 0;
print "$_\n";
return (undef, $ruri->as_string);
}
$SUCCESS++;
# Warn when not quiet
print "$urirep " . $r->status_line . ": " . $ruri->as_string . "\n"
if $VERBOSE > 1;
return (undef, $ruri->as_string);
# Bad response that we cannot go on
} elsif (grep($r->code == $_, (400, 403, 404, 410, 500)) > 0) {
$_ = $urirep;
$_ .= " " . $r->status_line if $VERBOSE > 0;
print "$_\n";
return (undef, undef);
# Bad response that we should not keep requesting on a same server
} elsif ($r->code == 503) {
$_ = $urirep;
$_ .= " " . $r->status_line if $VERBOSE > 0;
print "$_\n";
$NOREQ_HOSTS{noreq_key $uritext} = $uritext;
return (undef, undef);
# Unable to process
} else {
# Unable to process
print "$urirep " . $r->status_line . ": Unable to process this response\n";
return (undef, undef);
}
return;
}
# get_links: Parse the document and get the links inside
sub get_links($$) {
local ($_, %_);
my ($html, $base, $parser);
($html, $base) = @_;
$parser = new HTML::LinkExtor;
$parser->utf8_mode(1) if $] >= 5.008 && $HTML::Parser::VERSION >= 3.40;
$parser->parse($html);
@_ = qw();
foreach my $link ($parser->links) {
($_, %_) = @$link;
push @_, values %_;
}
proc_link_val $_, $base foreach @_;
return;
}
# proc_link_val: Process a found link value
sub proc_link_val($$) {
local ($_, %_);
my ($base, $uri);
($_, $base) = @_;
$uri = new URI($_);
# Make it canonical
$uri = $uri->abs($URIS{$base}) if !defined $uri->scheme;
# Skip schemes that are not supported
if (!exists $ALLOWED_SCHEMES{$uri->scheme}) {
$_ = rep_uri $URIS{$base};
print STDERR rep_uri($uri) . " (" . rep_uri($URIS{$base}) . "): "
. "Skipping unsupported scheme \"" . $uri->scheme . "\"\n"
if $VERBOSE > 3;
return;
}
# Skip local file URI referred from remote
if ($uri->scheme eq "file" && $URIS{$base}->scheme ne "file") {
print STDERR rep_uri($uri) . " (" . rep_uri($URIS{$base}) . "): "
. "Skipping file URI referred from remote\n"
if $VERBOSE > 3;
return;
}
# Skip file URI that is not local
if ($uri->scheme eq "file" && $uri->host ne "localhost" && $uri->host ne "") {
print STDERR rep_uri($uri) . " (" . rep_uri($URIS{$base}) . "): "
. "Skipping file URI that is not on localhost\n"
if $VERBOSE > 3;
return;
}
$uri->host($URIS{$base}->host) if !defined $uri->host || $uri->host eq "";
$uri->path("/") if $uri->path eq "";
$uri->fragment(undef);
# Use its canonical form
$uri = $uri->canonical;
# Save it
$URIS{$uri->as_string} = $uri if !exists $URIS{$uri->as_string};
$REFS{$uri->as_string} = [] if !exists $REFS{$uri->as_string};
push @{$REFS{$uri->as_string}}, [rep_uri $base];
# Local
if (get_target($uri->as_string) eq $LOCAL_TARGET) {
# Skip found URLs
return if exists $LFOUND{$uri->as_string};
# Skip parent directories
return if !$PARENT && $uri->path !~ /^$STARTDIR/;
push @LOCALS, $uri->as_string;
$LFOUND{$uri->as_string} = 1;
# Remote
} else {
# No remote
return if $NOREMOTE;
# Skip found URLs
return if exists $RFOUND{$uri->as_string};
push @REMOTES, $uri->as_string;
$RFOUND{$uri->as_string} = 1;
}
return;
}
# is_excluded: If this page is excluded
sub is_excluded($) {
local ($_, %_);
my ($page, $path, $excpath, $match);
$page = $_[0];
foreach (@EXCLUDES) {
$path = substr $_, 1;
# Directory match
if (/\/$/) {
$match = ($URIS{$page}->path =~ /^$path/);
# File or directory match
} else {
$match = ($URIS{$page}->path =~ /^$path(?![^\/?])/);
}
# minus (-) means "exclude"
return /^-/ if $match;
}
return 0;
}
# get_ua: Return a user agent for the request
sub get_ua($) {
local ($_, %_);
$_ = $_[0];
# Get the target of the request
$_ = get_target $_;
# User agent cached
return $UA{$_} if exists $UA{$_};
# Create a new user agent
$UA{$_} = new LWP::RobotUA(
"agent" => $UASTR,
"from" => (getlogin or getpwuid $> or $> or $THIS_FILE)
. "@" . hostname,
"keep_alive" => 1,
"cookie_jar" => $COOKIE_JAR,
);
$UA{$_}->delay(0);
#$LWP::Debug::current_level{"debug"} = 1;
$UA{$_}->default_header("Accept", "application/xhtml+xml,text/html;q=0.9,*/*;q=0.1");
return $UA{$_};
}
# get_target: Return the target of the request
sub get_target($) {
local ($_, %_);
my ($uritext, $uri, $scheme, $user, $pass, $host, $port);
$uritext = $_[0];
die sprintf("%s %s", (caller 2)[1,2]) if !defined $uritext;
# Target cached
return $TARGETS{$uritext} if exists $TARGETS{$uritext};
# Construct the target of our request
$uri = $URIS{$uritext};
$scheme = $uri->scheme;
if (!$uri->can("userinfo") || !defined($_ = $uri->userinfo)) {
($user, $pass) = (undef, undef);
} elsif ($_ =~ !/^([^:]+):(.+)$/) {
($user, $pass) = (uri_unescape($_), undef);
} else {
($user, $pass) = (uri_unescape($1), uri_unescape($2));
}
$host = $uri->host;
undef $port;
$port = $uri->port if $uri->can("port");
$_ = $uri->can("default_port") && defined $uri->default_port?
$uri->default_port: undef;
undef $port if defined $_ && $_ eq $port;
# Construct the target URI
$uri = new URI("");
$uri->scheme($scheme);
undef $_;
if (defined $user) {
$_ = uri_escape($user);
$_ .= ":" . uri_escape($pass) if defined $pass;
$uri->userinfo($_);
}
$uri->host($host);
$uri->port($port) if defined $port;
# Cache it
$TARGETS{$uritext} = $uri->canonical;
return $TARGETS{$uritext};
}
# noreq_key: Obtain the key to check if we should keep requesting on this server
sub noreq_key($) {
local ($_, %_);
my $uri;
$_ = $_[0];
$uri = new URI("");
$uri->scheme($URIS{$_}->scheme);
$uri->host(inet_aton($URIS{$_}->host));
$uri->port($URIS{$_}->port) if $URIS{$_}->can("port");
return $uri->canonical->as_string;
}
# rep_uri: Report an URI, a wrapper to URI->as_string that clean the file scheme
sub rep_uri($) {
local ($_, %_);
$_ = $_[0];
$_ = $_->as_string if ref($_) =~ /^URI\b/;
return $_ unless s/^file:\/\///;
# Have something simular to a volumn ID, for MSWin32
s/^\/([a-z]:)/$1/i;
return File::Spec->catdir(split /\//, $_);
}
__END__
=head1 NAME
chklinks - A non-threaded Perl link checker
=head1 SYNOPSIS
chklinks [options] URL1 [URL2 [UR3 ...]]
=head1 DESCRIPTION
F<chklinks> is a non-threaded Perl link checker. It helps finding
broken links on your website.
F<chklinks> differs from C<linkchecker> in that F<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.
F<chklinks> follows F<robots.txt> rules. If you disallow robots
from your website and experience problems, you need to allow
F<chklinks>. Add the following lines to your F<robots.txt> file to
allow F<chklinks>:
User-agent: chklinks
Disallow:
F<chklinks> uses L<LWP::RobotUA(3)|LWP::RobotUA/3> 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
L<Crypt::SSLeay(3)|Crypt::SSLeay/3>. This is the requirement of
L<LWP::RobotUA(3)|LWP::RobotUA/3>.)
F<chklinks> supports cookies.
=head1 OPTIONS
=over
=item -1,--onelevel
Check the links on this page and stops.
=item -r,--recursive
Recursively check through this website. This is the default.
=item -b,--below
Only check the links below this directory. This is the default.
=item -p,--parent
Trace back to the parent directories.
=item -l,--local
Only check the links on this same host.
=item -s,--span
Check the links to other hosts (without recursion). This is the
default.
=item -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 C<--exclude>
are OK.
=item -i,--include path
Include this path. An opposite of C<--exclude> that cancels its
effect. The latter specified has a higher priority.
=item -d,--debug
Display debug messages. Multiple C<--debug> to debug more.
=item -q,--quiet
Disable debug messages. An opposite that cancels the effect of
C<--debug>.
=item -h,--help
Display the help message and exit.
=item -v,--version
Output version information and exit.
=item URL1, URL2, URL3
The URLs of the websites to check against.
=back
=head1 NOTES
F<chklinks> does not obey C<Crawl-delay:> in F<robots.txt> yet.
This is a problem in L<WWW::RobotRules(3)|WWW::RobotRules/3>, but
not F<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 a L<LWP::Protocol(3)|LWP::Protocol/3> issue when working
with L<HTML::Parser(3)|HTML::Parser/3> version >= 3.40.
See CPAN RT Bug#20274 http://rt.cpan.org/Public/Bug/Display.html?id=20274
for a L<LWP::Protocol(3)|LWP::Protocol/3> patch on this.
=head1 BUGS
F<chklinks> does not support authentication yet. W3C-LinkChecker
have support on this. As a workaround, You can use the syntax
http://user:pass@some.where.com/some/path for Basic Authentication,
but this does not work on Digest Authentication. This practice is
not encouraged. Your password would be visable to anyone on this
system using F<ps>, including hidden intruders. Also what you type
in your shell will be saved to your shell history file.
C<mailto:> URLs should be supported by checking the validity of its
DNS/MX record. Bastian Kleineidam's L<linkchecker(1)|linkchecker/1>
have support on this.
Local file checking has only been tested on Unix and MSWin32. More
platforms should be tested, especially VMS and Mac.
=head1 SUPPORT
F<chklinks> is hosted on SourceForge, CPAN and Tavern IMACAT's. For
the latest infomation, see http://chklinks.sourceforge.net/ ,
http://sourceforge.net/projects/chklinks/ ,
http://search.cpan.org/dist/chklinks/ or
http://www.imacat.idv.tw/tech/chklinks.html .
F<chklinks> has a user discussion mailing list hosted at
SourceForge: chklinks-users@lists.sourceforge.net . It is a mailman
mailing list. For infomation on how to join or leave, see:
http://lists.sourceforge.net/lists/listinfo/chklinks-users .
Alternatively, you can send a mail to:
chklinks-users-request@lists.sourceforge.net with the subject C<help>
for a list of available commands.
=head1 SEE ALSO
L<LWP::UserAgent(3)|LWP::UserAgent/3>,
L<LWP::RobotUA(3)|LWP::RobotUA/3>, L<WWW::RobotRules(3)|WWW::RobotRules/3>,
L<URI(3)|URI/3>, L<HTML::LinkExtor(3)|HTML::LinkExtor/3>,
Bastian Kleineidam's L<linkchecker(1)|linkchecker/1>,
W3C-LinkChecker L<checklink(1)|checklink/1>.
=head1 AUTHOR
imacat <imacat@mail.imacat.idv.tw>.
=head1 COPYRIGHT
Copyright (c) 2003-2007 imacat.
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 I<WITHOUT ANY WARRANTY>; without even the implied warranty of
I<MERCHANTABILITY> or I<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 L<http://www.gnu.org/licenses/>.
=cut

477
chklinks.en.html Normal file
View File

@ -0,0 +1,477 @@
<?xml version="1.0" encoding="US-ASCII" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta name="author" content="imacat" />
<meta name="copyright" content="&copy; 2003-2008 imacat." />
<meta name="keywords" content="link checker, broken links" />
<link rel="alternate" type="application/xhtml+xml" href="chklinks.zh-tw.html"
hreflang="zh-tw" title="&#27491;&#39636;&#20013;&#25991;" />
<link rel="alternate" type="application/xhtml+xml" href="chklinks.zh-cn.html"
hreflang="zh-cn" title="&#31616;&#20307;&#20013;&#25991;" />
<link rel="copyright" type="text/plain" href="fdl.txt" />
<link rel="author" href="mailto:imacat&#64;mail.imacat.idv.tw" />
<style type="text/css">
h2, em {
text-transform: uppercase;
}
.accessguide {
font-size: 0.5em;
float: left;
width: 0.5em;
}
</style>
<title>chklinks Version 3.09</title>
</head>
<body>
<div class="langs" title="Language Switching Area">
<span xml:lang="zh-tw"><a href="chklinks.zh-tw.html"
title="&#20999;&#25563;&#21040;&#26412;&#38913;&#30340;&#27491;&#39636;&#20013;&#25991;&#29256;&#12290;"
hreflang="zh-tw">&#27491;&#39636;&#20013;&#25991;</a></span> |
<span xml:lang="zh-cn"><a href="chklinks.zh-cn.html"
title="&#20999;&#25442;&#21040;&#26412;&#39029;&#30340;&#31616;&#20307;&#20013;&#25991;&#29256;&#12290;"
hreflang="zh-cn">&#31616;&#20307;&#20013;&#25991;</a></span> |
<span>English</span>
</div>
<hr />
<div id="body" class="body" title="Page Content Area">
<div class="accessguide"><a accesskey="C"
href="#body" title="Page Content Area">:::</a></div>
<h1><samp>chklinks</samp> Version 3.09</h1>
<h2>What&rsquo;s New?</h2>
<dl>
<dt>2007-12-06</dt>
<dd>
<p><samp>chklinks</samp> version 3.09 is released. Fixed the bug on systems like <abbr title="Microsoft">MS</abbr>-Windows that does not have <samp>getpwuid()</samp>. <a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.09.tar.gz" type="application/x-gzip">Download <samp>chklinks</samp> version 3.09</a>.</p>
</dd>
<dt>2007-12-05</dt>
<dd>
<p><samp>chklinks</samp> version 3.08 is released. There are several documentation fixes. <a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.08.tar.gz" type="application/x-gzip">Download <samp>chklinks</samp> version 3.08</a>.</p>
</dd>
<dt>2007-12-05</dt>
<dd>
<p><samp>chklinks</samp> version 3.07 is released. Required <acronym title="Practical Extraction and Reporting Language">Perl</acronym> version number compatible to older versions, to work with the <acronym title="Practical Extraction and Reporting Language">Perl</acronym> 5.10 warning. License updated to <a href="http://www.gnu.org/licenses/gpl-3.0.html"><abbr title="GNU General Public License version 3">GPLv3</abbr></a>. <a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.07.tar.gz" type="application/x-gzip">Download <samp>chklinks</samp> version 3.07</a>.</p>
</dd>
<dt>2007-06-08</dt>
<dd>
<p><samp>chklinks</samp> version 3.06 is released. Test suite fixes. <a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.06.tar.gz" type="application/x-gzip">Download <samp>chklinks</samp> version 3.06</a>.</p>
</dd>
<dt>2007-06-07</dt>
<dd>
<p><samp>chklinks</samp> version 3.05 is released. Fixed problem with <acronym title="Practical Extraction and Reporting Language">Perl</acronym> version earlier than 5.8 where <abbr title="unicode translation format">UTF</abbr>-8 mode is not available. <a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.05.tar.gz" type="application/x-gzip">Download <samp>chklinks</samp> version 3.05</a>.</p>
</dd>
<dt>2007-06-06</dt>
<dd>
<p><samp>chklinks</samp> version 3.04 is released. Documentation fixes. <a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.04.tar.gz" type="application/x-gzip">Download <samp>chklinks</samp> version 3.04</a>.</p>
</dd>
<dt>2007-06-06</dt>
<dd>
<p><samp>chklinks</samp> version 3.03 is released. Fixed the raw <abbr title="unicode translation format">UTF</abbr>-8 warning with <a href="http://search.cpan.org/dist/HTML-Parser/"><samp>HTML::Parser</samp></a>. Added support for building with <a href="http://search.cpan.org/dist/Module-Build/"><samp>Module::Build</samp></a>. <a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.03.tar.gz" type="application/x-gzip">Download <samp>chklinks</samp> version 3.03</a>.</p>
</dd>
<dt>2006-06-02</dt>
<dd>
<p><samp>chklinks</samp> version 3.02 is released. The digital signature is corrected. <a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.02.tar.gz" type="application/x-gzip">Download <samp>chklinks</samp> version 3.02</a>.</p>
</dd>
<dt>2006-05-31</dt>
<dd>
<p><samp>chklinks</samp> version 3.01 is released. This fixed a missing prerequisites in <samp>Makefile.PL</samp>. <abbr title="HyperText Markup Language">HTML</abbr> documents are returned. <a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.01.tar.gz" type="application/x-gzip">Download <samp>chklinks</samp> version 3.01</a>.</p>
</dd>
<dt>2006-05-30</dt>
<dd>
<p><samp>chklinks</samp> version 3.00 is released. It uses <a href="http://search.cpan.org/dist/HTML-Parser/"><samp>HTML::LinkExtor</samp></a> to parse the page and <a href="http://search.cpan.org/dist/libwww-perl/"><samp>LWP::RobotUA</samp></a> to make requests. More <abbr title="Uniform Resource Locator">URL</abbr> schemes other than <samp>http</samp> are supported. Cookies are supported. <samp>robots.txt</samp> rules are respected. <a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.00.tar.gz" type="application/x-gzip">Download <samp>chklinks</samp> version 3.00</a>.</p>
</dd>
<dt>2005-10-02</dt>
<dd>
<p>Website style adjustment. <abbr title="Web Content Accessibility Guidelines">WCAG</abbr> Accessibility designs are added. <code>&lt;hr /&gt;</code>s are replaced by <abbr title="Cascading StyleSheets">CSS</abbr> borders for accessibility reason.</p>
</dd>
<dt>2005-04-27</dt>
<dd>
<p>The text <q xml:lang="zh-tw">&#32321;&#39636;&#20013;&#25991;</q> on the website is corrected to <q xml:lang="zh-tw">&#27491;&#39636;&#20013;&#25991;</q>.</p>
</dd>
<dt>2003-05-26</dt>
<dd>
<p><samp>chklinks</samp> version 2.02 is released. The default changed from one-level to recursive. This is more desirable in most cases. <a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-2.02.tar.gz" type="application/x-gzip">Download <samp>chklinks</samp> version 2.02</a>.</p>
</dd>
<dt>2003-05-25</dt>
<dd>
<p><samp>chklinks</samp> version 2.01 is released. An installer, accessary files and a <abbr title="plain old document">POD</abbr> document are added. <a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-2.01.tar.gz" type="application/x-gzip">Download <samp>chklinks</samp> version 2.01</a>.</p>
</dd>
<dt>2003-05-25</dt>
<dd>
<p><samp>chklinks</samp> version 2.0.0 is released. This is the first public release uploaded onto SourceForge. Only the main script file is available. <a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-2.0.0.tar.gz" type="application/x-gzip">Download <samp>chklinks</samp> version 2.0.0</a>.</p>
</dd>
<dt>2003-05-19</dt>
<dd>
<p>SourceForge project space approved.</p>
</dd>
<dt>2003-05-18</dt>
<dd>
<p>Requesting a SourceForge project space.</p>
</dd>
</dl>
<h2>Description</h2>
<p><dfn><samp>chklinks</samp></dfn> is a non-threaded <acronym title="Practical Extraction and Reporting Language">Perl</acronym> link checker. It helps finding broken links on your website.</p>
<p><samp>chklinks</samp> differs from <a href="http://linkchecker.sourceforge.net/"><samp>linkchecker</samp></a> in that <samp>chklinks</samp> is non-threaded. It does not raises many simultaneously connections for its job. It won&rsquo;t run out of the resources and crash your system in a moment. This is certainly more desirable for most webmasters and users.</p>
<p><samp>chklinks</samp> follows <samp>robots.txt</samp> rules. If you disallow robots from your website and experience problems, you need to allow <samp>chklinks</samp>. Add the following lines to your <samp>robots.txt</samp> file to allow <samp>chklinks</samp>:</p>
<blockquote><pre>
User-agent: chklinks
Disallow:
</pre></blockquote>
<p><samp>chklinks</samp> uses <a href="http://search.cpan.org/dist/libwww-perl/"><samp>LWP::RobotUA</samp></a> and support the following schemes: <samp>http</samp>, <samp>https</samp>, <samp>ftp</samp>, <samp>gopher</samp> and <samp>file</samp>. You can also specify a local file. (To use <samp>https</samp>, you need to install <a href="http://search.cpan.org/dist/Crypt-SSLeay/"><samp>Crypt::SSLeay</samp></a>. This is the requirement of
<a href="http://search.cpan.org/dist/libwww-perl/"><samp>LWP::RobotUA</samp></a>.)</p>
<p><samp>chklinks</samp> supports cookies.</p>
<h2>System Requirement</h2>
<ol>
<li><p><acronym title="Practical Extraction and Reporting Language">Perl</acronym>, version 5.6 or above. I have not successfully run this on earlier versions. Please tell me if you can. You can run <q><samp>perl -v</samp></q> to see your current <acronym title="Practical Extraction and Reporting Language">Perl</acronym> version. <acronym title="Practical Extraction and Reporting Language">Perl</acronym> is distributed with most Unix now. If not, or if you have an older version of <acronym title="Practical Extraction and Reporting Language">Perl</acronym>, you can download and install/upgrade it from <a href="http://www.perl.com/"><acronym title="Practical Extraction and Reporting Language">Perl</acronym> website</a>. If you are using <abbr title="Microsoft">MS</abbr>-Windows, you can download and install <a href="http://www.activestate.com/">ActiveState ActivePerl</a>.</p></li>
<li><p>Required <acronym title="Practical Extraction and Reporting Language">Perl</acronym> modules:</p>
<dl>
<dt><a href="http://search.cpan.org/dist/URI/"><samp>URI</samp></a></dt>
<dd>
<p>This is used to parse and process the found <abbr title="uniform resource locator">URL</abbr>s. You can <a href="http://search.cpan.org/dist/URI/">download and install <samp>URI</samp> from the <acronym title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</acronym> archive</a>, or install it with the <samp>CPAN</samp> shell by running <q><samp>cpan URI</samp></q>, or install it with the <samp>CPANPLUS</samp> shell by running <q><samp>cpanp i URI</samp></q>. Debian/Ubandu Linux users can install it by running <q><samp>apt-get install liburi-perl</samp></q>. Red Hat/Fedora/CentOS Linux users can install it by running <q><samp>yum install perl-URI</samp></q>. FreeBSD users can install it by running <q><samp>ports install p5-URI</samp></q>. ActivePerl users can install it by running <q><samp>ppm install URI</samp></q>.</p>
</dd>
<dt><a href="http://search.cpan.org/dist/HTML-Parser/"><samp>HTML::LinkExtor</samp></a></dt>
<dd>
<p>This is used to extract links from the web pages. <samp>HTML::LinkExtor</samp> is contained in the <a href="http://search.cpan.org/dist/HTML-Parser/">HTML-Parser</a> distribution. You can <a href="http://search.cpan.org/dist/HTML-Parser/">download and install <samp>HTML::LinkExtor</samp> from the <acronym title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</acronym> archive</a>, or install it with the <samp>CPAN</samp> shell by running <q><samp>cpan HTML::LinkExtor</samp></q>, or install it with the <samp>CPANPLUS</samp> shell by running <q><samp>cpanp i HTML::LinkExtor</samp></q>. Debian/Ubandu Linux users can install it by running <q><samp>apt-get install libhtml-parser-perl</samp></q>. Red Hat/Fedora/CentOS Linux users can install it by running <q><samp>yum install perl-HTML-Parser</samp></q>. FreeBSD users can install it by running <q><samp>ports install p5-HTML-Parser</samp></q>. ActivePerl users can install it by running <q><samp>ppm install HTML::LinkExtor</samp></q>.</p>
</dd>
<dt><a href="http://search.cpan.org/dist/libwww-perl/"><samp>LWP::RobotUA</samp></a></dt>
<dd>
<p>This is used to request web pages. <samp>LWP::RobotUA</samp> is contained in the <a href="http://search.cpan.org/dist/libwww-perl/">libwww-perl</a> distribution. You can <a href="http://search.cpan.org/dist/libwww-perl/">download and install <samp>LWP::RobotUA</samp> from the <acronym title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</acronym> archive</a>, or install it with the <samp>CPAN</samp> shell by running <q><samp>cpan LWP::RobotUA</samp></q>, or install it with the <samp>CPANPLUS</samp> shell by running <q><samp>cpanp i LWP::RobotUA</samp></q>. Debian/Ubandu Linux users can install it by running <q><samp>apt-get install libwww-perl</samp></q>. Red Hat/Fedora/CentOS Linux users can install it by running <q><samp>yum install perl-libwww-perl</samp></q>. FreeBSD users can install it by running <q><samp>ports install p5-libwww</samp></q>. ActivePerl users can install it by running <q><samp>ppm install LWP::RobotUA</samp></q>.</p>
</dd>
</dl>
<p>If you install <samp>chklinks</samp> with the <samp>CPAN</samp> or <samp>CPAN</samp> shell, the above shall be automatically installed.</p>
</li>
<li><p>Optional <acronym title="Practical Extraction and Reporting Language">Perl</acronym> modules:</p>
<dl>
<dt><a href="http://search.cpan.org/dist/Crypt-SSLeay/"><samp>Crypt::SSLeay</samp></a></dt>
<dd>
<p>This is needed for <a href="http://search.cpan.org/dist/libwww-perl/"><samp>LWP::RobotUA</samp></a> to support <abbr title="Hypertext Transfer Protocol over Secure Socket Layer">HTTPS</abbr>. You can <a href="http://search.cpan.org/dist/Config-General/">download and install <samp>Config::General</samp> from the <acronym title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</acronym> archive</a>, or install it with the <samp>CPAN</samp> shell by running <q><samp>cpan Config::General</samp></q>, or install it with the <samp>CPANPLUS</samp> shell by running <q><samp>cpanp i Config::General</samp></q>. Debian/Ubandu Linux users can install it by running <q><samp>apt-get install libconfig-general-perl</samp></q>. Red Hat/Fedora/CentOS Linux users can install it by running <q><samp>yum install perl-Config-General</samp></q>. FreeBSD users can install it by running <q><samp>ports install p5-Config-General</samp></q>. <a href="http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/Repository">ActiveState does not host the <abbr title="Perl Package Manager">PPM</abbr> build of <samp>Crypt::SSLeay</samp> for ActivePerl due to the Canadian Federal Government requirement.</a> However, ActivePerl users can still install it from another repository, by running <q><samp>ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd</samp></q>.</p>
</dd>
</dl>
</li>
</ol>
<h2>Download</h2>
<p><samp>chklinks</samp>&rsquo;s official websites is at&hellip;</p>
<ul>
<li><p><a href="http://chklinks.sourceforge.net/"><samp>chklinks</samp> web site at SourceForge</a>.</p></li>
<li><p><a href="http://sourceforge.net/projects/chklinks/"><samp>chklinks</samp> project page at SourceForge</a>.</p></li>
<li><p><a href="http://search.cpan.org/dist/chklinks/"><samp>chklinks</samp> project page at <abbr title="Comprehensive Perl Archive Network">CPAN</abbr></a>.</p></li>
<li><p><a href="http://www.imacat.idv.tw/tech/chklinks.html"><samp>chklinks</samp> page at Tavern IMACAT&rsquo;s</a>.</p></li>
</ul>
<p>You can always download the newest version of <samp>chklinks</samp> from&hellip;</p>
<ul>
<li><p><a href="https://sourceforge.net/project/showfiles.php?group_id=81431"><samp>chklinks</samp> download page at SourceForge</a>.</p></li>
<li><p><a href="http://search.cpan.org/dist/chklinks/"><samp>chklinks</samp>&rsquo;s project page at <abbr title="Comprehensive Perl Archive Network">CPAN</abbr></a>.</p></li>
<li><p><a href="ftp://ftp.imacat.idv.tw/pub/chklinks/">Tavern IMACAT&rsquo;s <abbr title="File Transfer Protocol">FTP</abbr> directory</a>.</p></li>
</ul>
<p>imacat&rsquo;s <abbr title="Pretty Good Privacy">PGP</abbr> public key is at&hellip;</p>
<ul>
<li><p><a href="http://chklinks.sourceforge.net/pgpkey.asc" type="application/pgp-keys">imacat&rsquo;s <abbr title="Pretty Good Privacy">PGP</abbr> key at <samp>chklinks</samp> SourceForge web site</a>.</p></li>
<li><p><a href="http://www.imacat.idv.tw/me/pgpkey.asc" type="application/pgp-keys">imacat&rsquo;s <abbr title="Pretty Good Privacy">PGP</abbr> key at Tavern IMACAT&rsquo;s</a>.</p></li>
</ul>
<h2>Install</h2>
<h3>Install with <a href="http://search.cpan.org/dist/ExtUtils-MakeMaker/"><samp>ExtUtils::MakeMaker</samp></a></h3>
<p><samp>chklinks</samp> uses standard <acronym title="Practical Extraction and Reporting Language">Perl</acronym> installation with <a href="http://search.cpan.org/dist/ExtUtils-MakeMaker/"><samp>ExtUtils::MakeMaker</samp></a>. Follow these steps:</p>
<blockquote><pre>
% perl Makefile.PL
% make
% make test
% make install
</pre></blockquote>
<p>When running <q><samp>make install</samp></q>, make sure you have the priviledge to write to the installation location. This usually requires the <samp>root</samp> priviledge.</p>
<p>If you are using ActivePerl under <abbr title="Microsoft">MS</abbr>-Windows, you should use <samp>nmake</samp> instead of <samp>make</samp>. <a href="ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe" type="application/x-dosexec"><samp>nmake</samp> can be obtained from the Microsoft <abbr title="File Transfer Protocol">FTP</abbr> site.</a></p>
<p>If you want to install into another location, you can set the <samp>PREFIX</samp>. For example, to install into your home when you are not <samp>root</samp>:</p>
<blockquote><pre>
% perl Makefile.PL PREFIX=/home/jessica
</pre></blockquote>
<p>Refer to the docuemntation of <a href="http://search.cpan.org/dist/ExtUtils-MakeMaker/" hreflang="en" xml:lang="en"><samp>ExtUtils::MakeMaker</samp></a> for more installation options (by running <q><samp>perldoc ExtUtils::MakeMaker</samp></q>).</p>
<h3>Install with <a href="http://search.cpan.org/dist/Module-Build/"><samp>Module::Build</samp></a></h3>
<p>You can install with <a href="http://search.cpan.org/dist/Module-Build/"><samp>Module::Build</samp></a> instead, if you prefer. Follow these steps:</p>
<blockquote><pre>
% perl Build.PL
% ./Build
% ./Build test
% ./Build install
</pre></blockquote>
<p>When running <q><samp>./Build install</samp></q>, make sure you have the priviledge to write to the installation location. This usually requires the <samp>root</samp> priviledge.</p>
<p>If you want to install into another location, you can set the <samp>--prefix</samp>. For example, to install into your home when you are not <samp>root</samp>:</p>
<blockquote><pre>
% perl Build.PL --prefix=/home/jessica
</pre></blockquote>
<p>Refer to the docuemntation of <a href="http://search.cpan.org/dist/Module-Build/"><samp>Module::Build</samp></a> for more installation options (by running <q><samp>perldoc Module::Build</samp></q>).</p>
<h2>Options</h2>
<pre>
./chklinks [options] <var>URL1</var> [<var>URL2</var> [<var>URL3</var> &hellip;]]
./chklinks [-h|-v]
</pre>
<dl>
<dt>-1,--onelevel</dt>
<dd>
<p>Check the links on this page and stops.</p>
</dd>
<dt>-r,--recursive</dt>
<dd>
<p>Recursively check through this website. This is the default.</p>
</dd>
<dt>-b,--below</dt>
<dd>
<p>Only check the links below this directory. This is the default.</p>
</dd>
<dt>-p,--parent</dt>
<dd>
<p>Trace back to the parent directories.</p>
</dd>
<dt>-l,--local</dt>
<dd>
<p>Only check the links on this same host.</p>
</dd>
<dt>-s,--span</dt>
<dd>
<p>Check the links to other hosts (without recursion). This is the default.</p>
</dd>
<dt>-e,--exclude <var>path</var></dt>
<dd>
<p>Exclude this path. Check for their existence but not check the links on them, just like they are on a foreign site. Multiple <samp>--exclude</samp> are <acronym title="okay">OK</acronym>.</p>
</dd>
<dt>-i,--include <var>path</var></dt>
<dd>
<p>Include this path. An opposite of <samp>--exclude</samp> that cancels its effect. The latter specified has a higher priority.</p>
</dd>
<dt>-d,--debug</dt>
<dd>
<p>Display debug messages. Multiple <samp>--debug</samp> to debug more.</p>
</dd>
<dt>-q,--quiet</dt>
<dd>
<p>Disable debug messages. An opposite that cancels the effect of <samp>--debug</samp>.</p>
</dd>
<dt>-h, --help</dt>
<dd>
<p>Display the help message and exit.</p>
</dd>
<dt>-v, --version</dt>
<dd>
<p>Output version information and exit.</p>
</dd>
<dt><var>URL1</var>, <var>URL2</var>, <var>URL3</var></dt>
<dd>
<p>The <abbr title="Uniform Resource Locator">URL</abbr>s of the websites to check against.</p>
</dd>
</dl>
<h2>Notes</h2>
<ul>
<li><p><samp>chklinks</samp> does not obey <a href="http://help.yahoo.com/help/us/ysearch/slurp/slurp-03.html"><samp>Crawl-delay:</samp></a> in <samp>robots.txt</samp> yet. This is a problem in <a href="http://search.cpan.org/dist/libwww-perl/"><samp>WWW::RobotRules</samp></a>, but not <samp>chklinks</samp> itself.</p></li>
<li><p>If you encounter warnings like this:</p>
<blockquote>
<pre>Parsing of undecoded UTF-8 will give garbage when decoding entities at /usr/share/perl5/LWP/Protocol.pm line 114.</pre>
</blockquote>
<p>This is an issue of <a href="http://search.cpan.org/dist/libwww-perl/"><samp>LWP::Protocol</samp></a> version &le; 1.43 (in <samp>libwww-perl</samp> version &le; 5.805) when working with <a href="http://search.cpan.org/dist/HTML-Parser/"><samp>HTML::Parser</samp></a> version &ge; 3.40 and <acronym title="Practical Extraction and Reporting Language">Perl</acronym> version &ge; 5.8. This issue is solved in <a href="http://search.cpan.org/dist/libwww-perl/"><samp>LWP::Protocol</samp></a> version &ge; 1.46 (in <samp>libwww-perl</samp> version &ge; 5.806). You can upgrade your <a href="http://search.cpan.org/dist/libwww-perl/"><samp>LWP::Protocol</samp></a> to the current version. If you cannot upgrade it, see <a href="http://rt.cpan.org/Public/Bug/Display.html?id=20274"><acronym title="Comprehensive Perl Archive Network">CPAN</acronym> RT Bug#20274</a> for an <a href="http://search.cpan.org/dist/libwww-perl/"><samp>LWP::Protocol</samp></a> patch on this.</p>
</li>
</ul>
<h2>See Also</h2>
<p><a href="http://search.cpan.org/dist/libwww-perl/"><samp>LWP::UserAgent</samp></a>, <a href="http://search.cpan.org/dist/libwww-perl/"><samp>LWP::RobotUA</samp></a>, <a href="http://search.cpan.org/dist/libwww-perl/"><samp>WWW::RobotRules</samp></a>, <a href="http://search.cpan.org/dist/URI/"><samp>URI</samp></a>, <a href="http://search.cpan.org/dist/HTML-Parser/"><samp>HTML::LinkExtor</samp></a>, Bastian Kleineidam&rsquo;s <a href="http://linkchecker.sourceforge.net/"><samp>linkchecker</samp></a> and W3C-LinkChecker <a href="http://validator.w3.org/checklink"><samp>checklink</samp></a>.</p>
<h2>Copyright</h2>
<p>Copyright &copy; 2003-2007 imacat. All rights reserved.</p>
<p>This program is free software: you can redistribute it and/or modify it under the terms of the <cite><acronym title="GNU&rsquo;s Not UNIX">GNU</acronym> General Public License</cite> as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
<p>This program is distributed in the hope that it will be useful, but <em>without any warranty</em>; without even the implied warranty of <em>merchantability</em> or <em>fitness for a particular purpose</em>. See the <cite><acronym title="GNU&rsquo;s Not UNIX">GNU</acronym> General Public License</cite> for more details.</p>
<p>You should have received a copy of the <cite><acronym title="GNU&rsquo;s Not UNIX">GNU</acronym> General Public License</cite> along with this program. If not, see <samp>&lt;<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>&gt;</samp>.</p>
<h2>Release Notes</h2>
<p>Please read the <samp>NEWS</samp> for the new functions and bug fixes.</p>
<h2>Support</h2>
<p><samp>chklinks</samp> is hosted on <a href="https://sourceforge.net/">SourceForge</a>, <a href="http://www.cpan.org/"><acronym title="Comprehensive Perl Archive Network">CPAN</acronym></a> and <a href="http://www.imacat.idv.tw/">Tavern IMACAT&rsquo;s</a>. For the latest infomation, see</p>
<ul>
<li><p><a href="http://chklinks.sourceforge.net/"><samp>chklinks</samp> web site at SourceForge</a>.</p></li>
<li><p><a href="http://sourceforge.net/projects/chklinks/"><samp>chklinks</samp> project page at SourceForge</a>.</p></li>
<li><p><a href="http://search.cpan.org/dist/chklinks/"><samp>chklinks</samp> project page at <abbr title="Comprehensive Perl Archive Network">CPAN</abbr></a>.</p></li>
<li><p><a href="http://www.imacat.idv.tw/tech/chklinks.html"><samp>chklinks</samp> page at Tavern IMACAT&rsquo;s</a>.</p></li>
</ul>
<p>There is a <a href="mailto:chklinks-users&#64;lists.sourceforge.net"><samp>chklinks</samp> mailing list</a> hosted at <a href="https://sourceforge.net/">SourceForge</a>. Please submit your questions, suggestions or bug reports there. It is a <a href="http://www.list.org/">Mailman</a> mailing list. For more information, see the <a href="https://lists.sourceforge.net/lists/listinfo/chklinks-users"><samp>chklinks</samp> mailing list page</a>. Alternatively, you can send a mail to the <a href="mailto:chklinks-users-request&#64;lists.sourceforge.net"><acronym title="electronic mail">e-mail</acronym> command mailbox</a> with the subject <samp>help</samp> for a list of available <acronym title="electronic mail">e-mail</acronym> commands.</p>
</div>
<hr />
<div id="footer" class="footer" title="Page Footer Area">
<address>By <a href="mailto:imacat&#64;mail.imacat.idv.tw">imacat</a>, first version 2003-05-25, last updated 2008-11-17</address>
<address>Copyright &copy; 2003-2008 imacat. Please read the <a href="fdl.txt">copyright</a> before copying.</address>
</div>
</body>
</html>

477
chklinks.zh-cn.html Normal file
View File

@ -0,0 +1,477 @@
<?xml version="1.0" encoding="GB2312" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta name="author" content="依玛猫" />
<meta name="copyright" content="&copy; 2003-2008 依玛猫。" />
<meta name="keywords" content="网站超连结检查程式" />
<link rel="alternate" type="application/xhtml+xml" href="chklinks.zh-tw.html"
hreflang="zh-tw" title="正&#39636;中文" />
<link rel="alternate" type="application/xhtml+xml" href="chklinks.en.html"
hreflang="en-us" title="English" />
<link rel="copyright" type="text/plain" href="fdl.txt" />
<link rel="author" href="mailto:imacat&#64;mail.imacat.idv.tw" />
<style type="text/css">
h2, em {
text-transform: uppercase;
}
.accessguide {
font-size: 0.5em;
float: left;
width: 0.5em;
}
q {
quotes: "“" "”" "" "";
}
</style>
<title>chklinks 3.09 版</title>
</head>
<body>
<div class="langs" title="语言切换区">
<span xml:lang="zh-tw"><a href="chklinks.zh-tw.html"
title="切&#25563;到本&#38913;的正&#39636;中文版。"
hreflang="zh-tw">正&#39636;中文</a></span> |
<span>简体中文</span> |
<span xml:lang="en-us"><a href="chklinks.en.html"
title="Switch to the English version of this page."
hreflang="en-us">English</a></span>
</div>
<hr />
<div id="body" class="body" title="网页内文区">
<div class="accessguide"><a accesskey="C"
href="#body" title="网页内文区">:::</a></div>
<h1><samp xml:lang="en">chklinks</samp> 3.09 版</h1>
<h2>最新消息</h2>
<dl>
<dt>2007-12-06</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.09 。新版修正像 <span xml:lang="en"><abbr title="Microsoft">MS</abbr>-Windows</span> 之类不支援 <samp xml:lang="en">getpwuid()</samp> 呼叫的作业系统的问题。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.09.tar.gz" type="application/x-gzip">下载 <samp xml:lang="en">chklinks</samp> 3.09 版</a></p>
</dd>
<dt>2007-12-05</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.08 。新版修正好几个说明文件的问题。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.08.tar.gz" type="application/x-gzip">下载 <samp xml:lang="en">chklinks</samp> 3.08 版</a></p>
</dd>
<dt>2007-12-05</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.07 。所需 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 版本号码改用相容於旧版的号码格式,以消除 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 5.10 的警告讯息。版权更新为 <a href="http://www.gnu.org/licenses/gpl-3.0.html" hreflang="en" xml:lang="en"><abbr title="GNU General Public License version 3" xml:lang="en">GPLv3</abbr></a><a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.07.tar.gz" type="application/x-gzip">下载 <samp xml:lang="en">chklinks</samp> 3.07 版</a></p>
</dd>
<dt>2007-06-08</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.06 。测试程式修正。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.06.tar.gz" type="application/x-gzip">下载 <samp xml:lang="en">chklinks</samp> 3.06 版</a></p>
</dd>
<dt>2007-06-07</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.05 。修正 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 5.8 版以前无 <abbr title="unicode translation format" xml:lang="en">UTF</abbr>-8 模式的问题。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.05.tar.gz" type="application/x-gzip">下载 <samp xml:lang="en">chklinks</samp> 3.05 版</a></p>
</dd>
<dt>2007-06-06</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.04 。修正说明文件。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.04.tar.gz" type="application/x-gzip">下载 <samp xml:lang="en">chklinks</samp> 3.04 版</a></p>
</dd>
<dt>2007-06-06</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.03 。修正 <a href="http://search.cpan.org/dist/HTML-Parser/" hreflang="en" xml:lang="en"><samp>HTML::Parser</samp></a> 的原始 <abbr title="unicode translation format" xml:lang="en">UTF</abbr>-8 警告讯息,加上支援以 <a href="http://search.cpan.org/dist/Module-Build/" hreflang="en" xml:lang="en"><samp>Module::Build</samp></a> 安装。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.03.tar.gz" type="application/x-gzip">下载 <samp xml:lang="en">chklinks</samp> 3.03 版</a></p>
</dd>
<dt>2006-06-02</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.02 。更正错误的数位签章。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.02.tar.gz" type="application/x-gzip">下载 <samp xml:lang="en">chklinks</samp> 3.02 版</a></p>
</dd>
<dt>2006-05-31</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.01 。修正 <samp xml:lang="en">Makefile.PL</samp> 漏掉的相依模组,并把漏掉的 <abbr title="HyperText Markup Language" xml:lang="en">HTML</abbr> 文件加回来。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.01.tar.gz" type="application/x-gzip">下载 <samp xml:lang="en">chklinks</samp> 3.01 版</a></p>
</dd>
<dt>2006-05-30</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.00 。改用 <a href="http://search.cpan.org/dist/HTML-Parser/" hreflang="en" xml:lang="en"><samp>HTML::LinkExtor</samp></a> 解读网页并用 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::RobotUA</samp></a> 连线取得网页。支援 <samp xml:lang="en">http</samp> 外的其它网址格式。支援网站的 <span xml:lang="en">Cookies</span> 。遵守 <samp xml:lang="en">robots.txt</samp> 设定的规则。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.00.tar.gz" type="application/x-gzip">下载 <samp xml:lang="en">chklinks</samp> 3.00 版</a></p>
</dd>
<dt>2005-10-02</dt>
<dd>
<p>网站样式调整,加上无障碍网页的设计,以 <abbr title="Cascading StyleSheets" xml:lang="en">CSS</abbr> 边框代替 <samp xml:lang="en">&lt;hr /&gt;</samp> ,以符合无障碍网页空间的要求。</p>
</dd>
<dt>2005-04-27</dt>
<dd>
<p>网站上的<q>繁体中文</q>字样更正为<q>正体中文</q></p>
</dd>
<dt>2003-05-26</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 2.02 。预设由检查本页就好,改为检查整个网站。这样比较符合大多数的需求。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-2.02.tar.gz" type="application/x-gzip">下载 <samp xml:lang="en">chklinks</samp> 2.02 版</a></p>
</dd>
<dt>2003-05-25</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 2.01 。加上安装程式、附加档案与 <abbr title="plain old document" xml:lang="en">POD</abbr> 说明档。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-2.01.tar.gz" type="application/x-gzip">下载 <samp xml:lang="en">chklinks</samp> 2.01 版</a></p>
</dd>
<dt>2003-05-25</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 2.0.0 。首次公开上传到 <span xml:lang="en">SourceForge</span> 。只有主程式。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-2.0.0.tar.gz" type="application/x-gzip">下载 <samp xml:lang="en">chklinks</samp> 2.0.0 版</a></p>
</dd>
<dt>2003-05-19</dt>
<dd>
<p><span xml:lang="en">SourceForge</span> 专案通过。</p>
</dd>
<dt>2003-05-18</dt>
<dd>
<p>申请 <span xml:lang="en">SourceForge</span> 专案。</p>
</dd>
</dl>
<h2>说明</h2>
<p><dfn><samp xml:lang="en">chklinks</samp></dfn> 是单执行绪的 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 连结检查程式,用来检查网站上的超连结有没有疏漏。</p>
<p><samp xml:lang="en">chklinks</samp><a href="http://linkchecker.sourceforge.net/" hreflang="en" xml:lang="en"><samp>linkchecker</samp></a> 不同之处在於,<samp xml:lang="en">chklinks</samp> 不是多执行绪的程式。 <samp xml:lang="en">chklinks</samp> 检查时,不会同时启动一大堆连线同步检查,耗尽系统资源,导致当机。对大多数网管和使用者而言,这样做安全得多。</p>
<p><samp xml:lang="en">chklinks</samp> 遵守 <samp xml:lang="en">robots.txt</samp> 设定的规则。若你的网站拒绝自动网页程式,导致 <samp xml:lang="en">chklinks</samp> 无法执行,请在你的 <samp xml:lang="en">robots.txt</samp> ,加入下列两行,放行 <samp xml:lang="en">chklinks</samp> </p>
<blockquote xml:lang="en"><pre>
User-agent: chklinks
Disallow:
</pre></blockquote>
<p><samp xml:lang="en">chklinks</samp> 使用 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::RobotUA</samp></a> 连线,支援下列通讯协定: <samp xml:lang="en">http</samp><samp xml:lang="en">https</samp><samp xml:lang="en">ftp</samp><samp xml:lang="en">gopher</samp><samp xml:lang="en">file</samp><samp xml:lang="en">chklinks</samp> 也可以检查一般的档案。(若要使用 <samp xml:lang="en">https</samp> 通讯协定,需先安装 <a href="http://search.cpan.org/dist/Crypt-SSLeay/" hreflang="en" xml:lang="en"><samp>Crypt::SSLeay</samp></a> 。这是 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::RobotUA</samp></a> 的需求。)</p>
<p><samp xml:lang="en">chklinks</samp> 支援网站的 <span xml:lang="en">Cookies</span></p>
<h2>系统需求</h2>
<ol>
<li><p><acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 5.6 或以上。我还没有在更早的版本上成功执行过。若你可以在更早的版本上执行,请告诉我。你可以输入 <q xml:lang="en"><samp>perl -v</samp></q> 查询你目前的 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 版本。目前大多数的 <span xml:lang="en">Unix</span> 系统都有 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 。如果你没有 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 或需要升级,可以到 <a href="http://www.perl.com/" hreflang="en"><acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 网站</a>下载安装最新版 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 。若你是用 <span xml:lang="en"><abbr title="Microsoft">MS</abbr>-Windows</span> ,可以下载安装 <a href="http://www.activestate.com/" hreflang="en"><span xml:lang="en">ActiveState</span> 公司的 <span xml:lang="en">ActivePerl</span></a></p></li>
<li><p>需搭配的 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 模组:</p>
<dl>
<dt><a href="http://search.cpan.org/dist/URI/" hreflang="en" xml:lang="en"><samp>URI</samp></a></dt>
<dd>
<p>这是解析、处理网址用的。你可以<a href="http://search.cpan.org/dist/URI/" hreflang="en"><acronym title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</acronym> 模组库下载安装 <samp xml:lang="en">URI</samp> </a>,或用 <span xml:lang="en"><samp>CPAN</samp> Shell</span> 执行 <q xml:lang="en"><samp>cpan URI</samp></q> 安装,或用 <span xml:lang="en"><samp>CPANPLUS</samp> Shell</span> 执行 <q xml:lang="en"><samp>cpanp i URI</samp></q> 安装。若你是 <span xml:lang="en">Debian/Ubandu Linux</span> 使用者,可以执行 <q xml:lang="en"><samp>apt-get install liburi-perl</samp></q> 安装。若你是 <span xml:lang="en">Red Hat/Fedora/CentOS Linux</span> 使用者,可以执行 <q xml:lang="en"><samp>yum install perl-URI</samp></q> 安装。若你是 <span xml:lang="en">FreeBSD</span> 使用者,可以执行 <q xml:lang="en"><samp>ports install p5-URI</samp></q> 安装。若你是 <span xml:lang="en">ActivePerl</span> 使用者,可以执行 <q xml:lang="en"><samp>ppm install URI</samp></q> 安装。</p>
</dd>
<dt><a href="http://search.cpan.org/dist/HTML-Parser/" hreflang="en" xml:lang="en"><samp>HTML::LinkExtor</samp></a></dt>
<dd>
<p>这是由网页里找出连结用的。 <samp xml:lang="en">HTML::LinkExtor</samp><a href="http://search.cpan.org/dist/HTML-Parser/" hreflang="en" xml:lang="en">HTML-Parser</a> 中的模组。你可以<a href="http://search.cpan.org/dist/HTML-Parser/" hreflang="en"><acronym title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</acronym> 模组库下载安装 <samp xml:lang="en">HTML::LinkExtor</samp> </a>,或用 <span xml:lang="en"><samp>CPAN</samp> Shell</span> 执行 <q xml:lang="en"><samp>cpan HTML::LinkExtor</samp></q> 安装,或用 <span xml:lang="en"><samp>CPANPLUS</samp> Shell</span> 执行 <q xml:lang="en"><samp>cpanp i HTML::LinkExtor</samp></q> 安装。若你是 <span xml:lang="en">Debian/Ubandu Linux</span> 使用者,可以执行 <q xml:lang="en"><samp>apt-get install libhtml-parser-perl</samp></q> 安装。若你是 <span xml:lang="en">Red Hat/Fedora/CentOS Linux</span> 使用者,可以执行 <q xml:lang="en"><samp>yum install perl-HTML-Parser</samp></q> 安装。若你是 <span xml:lang="en">FreeBSD</span> 使用者,可以执行 <q xml:lang="en"><samp>ports install p5-HTML-Parser</samp></q> 安装。若你是 <span xml:lang="en">ActivePerl</span> 使用者,可以执行 <q xml:lang="en"><samp>ppm install HTML::LinkExtor</samp></q> 安装。</p>
</dd>
<dt><a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::RobotUA</samp></a></dt>
<dd>
<p>这是抓取网页用的。 <samp xml:lang="en">LWP::RobotUA</samp><a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en">libwww-perl</a> 中的模组。你可以<a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en"><acronym title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</acronym> 模组库下载安装 <samp xml:lang="en">LWP::RobotUA</samp> </a>,或用 <span xml:lang="en"><samp>CPAN</samp> Shell</span> 执行 <q xml:lang="en"><samp>cpan LWP::RobotUA</samp></q> 安装,或用 <span xml:lang="en"><samp>CPANPLUS</samp> Shell</span> 执行 <q xml:lang="en"><samp>cpanp i LWP::RobotUA</samp></q> 安装。若你是 <span xml:lang="en">Debian/Ubandu Linux</span> 使用者,可以执行 <q xml:lang="en"><samp>apt-get install libwww-perl</samp></q> 安装。若你是 <span xml:lang="en">Red Hat/Fedora/CentOS Linux</span> 使用者,可以执行 <q xml:lang="en"><samp>yum install perl-libwww-perl</samp></q> 安装。若你是 <span xml:lang="en">FreeBSD</span> 使用者,可以执行 <q xml:lang="en"><samp>ports install p5-libwww</samp></q> 安装。若你是 <span xml:lang="en">ActivePerl</span> 使用者,可以执行 <q xml:lang="en"><samp>ppm install LWP::RobotUA</samp></q> 安装。</p>
</dd>
</dl>
<p>若你由 <samp xml:lang="en">CPAN</samp><span xml:lang="en"><samp>CPANPLUS</samp> Shell</span> 安装 <samp xml:lang="en">chklinks</samp> ,会自动帮你安装以上所需的模组。</p>
</li>
<li><p>选配的 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 模组:</p>
<dl>
<dt><a href="http://search.cpan.org/dist/Crypt-SSLeay/" hreflang="en" xml:lang="en"><samp>Crypt::SSLeay</samp></a></dt>
<dd>
<p>这是要让 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::RobotUA</samp></a> 支援 <abbr title="Hypertext Transfer Protocol over Secure Socket Layer" xml:lang="en">HTTPS</abbr> 的功能。你可以<a href="http://search.cpan.org/dist/Crypt-SSLeay/" hreflang="en"><acronym title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</acronym> 模组库下载安装 <samp xml:lang="en">Crypt::SSLeay</samp> </a>,或用 <span xml:lang="en"><samp>CPAN</samp> Shell</span> 执行 <q xml:lang="en"><samp>cpan Crypt::SSLeay</samp></q> 安装,或用 <span xml:lang="en"><samp>CPANPLUS</samp> Shell</span> 执行 <q xml:lang="en"><samp>cpanp i Crypt::SSLeay</samp></q> 安装。若你是 <span xml:lang="en">Debian/Ubandu Linux</span> 使用者,可以执行 <q xml:lang="en"><samp>apt-get install libcrypt-ssleay-perl</samp></q> 安装。若你是 <span xml:lang="en">Red Hat/Fedora/CentOS Linux</span> 使用者,可以执行 <q xml:lang="en"><samp>yum install perl-Crypt-SSLeay</samp></q> 安装。若你是 <span xml:lang="en">FreeBSD</span> 使用者,可以执行 <q xml:lang="en"><samp>ports install p5-Crypt-SSLeay</samp></q> 安装。<a href="http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/Repository" hreflang="en">因加拿大联邦政府的规定, <span xml:lang="en">ActiveState</span> 公司无法提供 <samp xml:lang="en">Crypt::SSLeay</samp><span xml:lang="en">ActivePerl <abbr title="Perl Package Manager">PPM</abbr></span> 套件安装。</a>不过若你是 <span xml:lang="en">ActivePerl</span> 使用者,还是可以改由其它套件库,执行 <q xml:lang="en"><samp>ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd</samp></q> 安装。</p>
</dd>
</dl>
</li>
</ol>
<h2>下载</h2>
<p><samp xml:lang="en">chklinks</samp> 的官方网站在:</p>
<ul>
<li><p><a href="http://chklinks.sourceforge.net/"><span xml:lang="en">SourceForge</span> 上的 <samp xml:lang="en">chklinks</samp> 网站</a></p></li>
<li><p><a href="http://sourceforge.net/projects/chklinks/" hreflang="en"><samp xml:lang="en">chklinks</samp> <span xml:lang="en">SourceForge</span> 专案页</a></p></li>
<li><p><a href="http://search.cpan.org/dist/chklinks/" hreflang="en"><samp xml:lang="en">chklinks</samp> <abbr title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</abbr> 专案页</a></p></li>
<li><p><a href="http://www.imacat.idv.tw/tech/chklinks.html">旅舍依玛 <samp xml:lang="en">chklinks</samp> 网页</a></p></li>
</ul>
<p>最新版 <samp xml:lang="en">chklinks</samp> 可由下列位址下载:</p>
<ul>
<li><p><a href="https://sourceforge.net/project/showfiles.php?group_id=81431" hreflang="en"><samp xml:lang="en">chklinks</samp> <span xml:lang="en">SourceForge</span> 下载页</a></p></li>
<li><p><a href="http://search.cpan.org/dist/chklinks/" hreflang="en"><samp xml:lang="en">chklinks</samp> <abbr title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</abbr> 专案页</a></p></li>
<li><p><a href="ftp://ftp.imacat.idv.tw/pub/chklinks/">旅舍依玛 <abbr title="File Transfer Protocol" xml:lang="en">FTP</abbr></a></p></li>
</ul>
<p>依玛猫的 <abbr title="Pretty Good Privacy" xml:lang="en">PGP</abbr> 公钥在:</p>
<ul>
<li><p><a href="http://chklinks.sourceforge.net/pgpkey.asc" type="application/pgp-keys"><samp xml:lang="en">chklinks</samp> <span xml:lang="en">SourceForge</span> 网站上的依玛猫 <abbr title="Pretty Good Privacy" xml:lang="en">PGP</abbr> 公钥</a></p></li>
<li><p><a href="http://www.imacat.idv.tw/me/pgpkey.asc" type="application/pgp-keys">旅舍依玛上的依玛猫 <abbr title="Pretty Good Privacy" xml:lang="en">PGP</abbr> 公钥</a></p></li>
</ul>
<h2>安装</h2>
<h3><a href="http://search.cpan.org/dist/ExtUtils-MakeMaker/" hreflang="en" xml:lang="en"><samp>ExtUtils::MakeMaker</samp></a> 安装</h3>
<p><samp xml:lang="en">chklinks</samp><acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 标准的 <a href="http://search.cpan.org/dist/ExtUtils-MakeMaker/" hreflang="en" xml:lang="en"><samp>ExtUtils::MakeMaker</samp></a> 安装,程序如下:</p>
<blockquote xml:lang="en"><pre>
% perl Makefile.PL
% make
% make test
% make install
</pre></blockquote>
<p><q xml:lang="en"><samp>make install</samp></q> 前,请先确认你有在安装目录存档的权限。通常这时候要切换为 <samp xml:lang="en">root</samp> ,才能安装存档。</p>
<p>若你是用 <span xml:lang="en"><abbr title="Microsoft">MS</abbr>-Windows</span> 下的 <span xml:lang="en">ActivePerl</span> <samp xml:lang="en">make</samp> 请改用 <samp xml:lang="en">nmake</samp><a href="ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe" type="application/x-dosexec"><samp xml:lang="en">nmake</samp>
由微软的 <abbr title="File Transfer Protocol" xml:lang="en">FTP</abbr> 站下载</a></p>
<p>若要安装到其它地方,请设定好 <samp xml:lang="en">PREFIX</samp> 。例如,一般使用者,要安装在自己的目录下时:</p>
<blockquote xml:lang="en"><pre>
% perl Makefile.PL PREFIX=/home/jessica
</pre></blockquote>
<p>要知道更多安装选项的细节,请参阅 <a href="http://search.cpan.org/dist/ExtUtils-MakeMaker/" hreflang="en" xml:lang="en"><samp>ExtUtils::MakeMaker</samp></a> 的说明(请执行 <q xml:lang="en"><samp>perldoc ExtUtils::MakeMaker</samp></q> )。</p>
<h3><a href="http://search.cpan.org/dist/Module-Build/" hreflang="en" xml:lang="en"><samp>Module::Build</samp></a> 安装</h3>
<p>若你喜欢,也可以用 <a href="http://search.cpan.org/dist/Module-Build/" hreflang="en" xml:lang="en"><samp>Module::Build</samp></a> 安装,程序如下:</p>
<blockquote xml:lang="en"><pre>
% perl Build.PL
% ./Build
% ./Build test
% ./Build install
</pre></blockquote>
<p><q xml:lang="en"><samp>./Build install</samp></q> 前,请先确认你有在安装目录存档的权限。通常这时候要切换为 <samp xml:lang="en">root</samp> ,才能安装存档。</p>
<p>若要安装到其它地方,请设定好 <samp xml:lang="en">--prefix</samp> 。例如,一般使用者,要安装在自己的目录下时:</p>
<blockquote xml:lang="en"><pre>
% perl Build.PL --prefix=/home/jessica
</pre></blockquote>
<p>要知道更多安装选项的细节,请参阅 <a href="http://search.cpan.org/dist/Module-Build/" hreflang="en" xml:lang="en"><samp>Module::Build</samp></a> 的说明(请执行 <q xml:lang="en"><samp>perldoc Module::Build</samp></q> )。</p>
<h2>命令列参数</h2>
<pre>
./chklinks [参数] <var>网址1</var> [<var>网址2</var> [<var>网址3</var> &hellip;]]
./chklinks [-h|-v]
</pre>
<dl>
<dt xml:lang="en">-1,--onelevel</dt>
<dd>
<p>检查本页就好,不继续查下去。</p>
</dd>
<dt xml:lang="en">-r,--recursive</dt>
<dd>
<p>检查完整个网站。预设是 <samp xml:lang="en">--recursive</samp></p>
</dd>
<dt xml:lang="en">-b,--below</dt>
<dd>
<p>只检查该目录下的连结。预设是 <samp xml:lang="en">--below</samp></p>
</dd>
<dt xml:lang="en">-p,--parent</dt>
<dd>
<p>上溯到全站的连结。</p>
</dd>
<dt xml:lang="en">-l,--local</dt>
<dd>
<p>只检查站上的连结,不检查站外连结。</p>
</dd>
<dt xml:lang="en">-s,--span</dt>
<dd>
<p>检查站外的连结(但不会查下去)。预设是 <samp xml:lang="en">--span</samp></p>
</dd>
<dt xml:lang="en">-e,--exclude <var xml:lang="zh-tw">路径</var></dt>
<dd>
<p>排除该路迳。把该路径下的档案当成站外连结,只检查能不能连,不深入查下去。你可以指定很多个 <samp xml:lang="en">--exclude</samp></p>
</dd>
<dt xml:lang="en">-i,--include <var xml:lang="zh-tw">路径</var></dt>
<dd>
<p>包含该路迳。和 <samp xml:lang="en">--exclude</samp> 效果相反,用来抵销 <samp xml:lang="en">--exclude</samp> 。排后面的优先处理。</p>
</dd>
<dt xml:lang="en">-d,--debug</dt>
<dd>
<p>显示详细的执行讯息。越多个 <samp xml:lang="en">--debug</samp> ,讯息越详细。</p>
</dd>
<dt xml:lang="en">-q,--quiet</dt>
<dd>
<p>关闭执行讯息。和 <samp xml:lang="en">--debug</samp> 效果相反,用来抵销 <samp xml:lang="en">--debug</samp></p>
</dd>
<dt xml:lang="en">-h, --help</dt>
<dd>
<p>显示程式说明。</p>
</dd>
<dt xml:lang="en">-v, --version</dt>
<dd>
<p>显示程式版本。</p>
</dd>
<dt xml:lang="en"><var xml:lang="zh-tw">网址1</var>, <var xml:lang="zh-tw">网址2</var>, <var xml:lang="zh-tw">网址3</var></dt>
<dd>
<p>要检查的网站网址。</p>
</dd>
</dl>
<h2>注意事项</h2>
<ul>
<li><p><samp xml:lang="en">chklinks</samp> 尚未遵守 <samp xml:lang="en">robots.txt</samp><a href="http://help.yahoo.com/help/us/ysearch/slurp/slurp-03.html" hreflang="en" xml:lang="en"><samp>Crawl-delay:</samp></a> 规则。不过这是 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>WWW::RobotRules</samp></a> 的问题,不是 <samp xml:lang="en">chklinks</samp> 的问题。</p></li>
<li><p>若出现以下警告:</p>
<blockquote xml:lang="en">
<pre>Parsing of undecoded UTF-8 will give garbage when decoding entities at /usr/share/perl5/LWP/Protocol.pm line 114.</pre>
</blockquote>
<p>这是 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::Protocol</samp></a> 1.43 版或之前的版本( <samp>libwww-perl</samp> 5.805 版或之前的版本),碰上 <a href="http://search.cpan.org/dist/HTML-Parser/" hreflang="en" xml:lang="en"><samp>HTML::Parser</samp></a> 3.40 版或之后的版本及 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 5.8 版或之后的版本时,产生的问题。 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::Protocol</samp></a> 1.46 版以后( <samp>libwww-perl</samp> 5.806 版以后),已解决这个问题。请升级到最新版的 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::Protocol</samp></a> 。若你因故无法升级,请参阅 <a href="http://rt.cpan.org/Public/Bug/Display.html?id=20274" hreflang="en" xml:lang="en"><acronym title="Comprehensive Perl Archive Network">CPAN</acronym> RT Bug#20274 报告</a>,取得 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::Protocol</samp></a> 的修补程式。</p>
</li>
</ul>
<h2>参考资料</h2>
<p><a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::UserAgent</samp></a><a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::RobotUA</samp></a><a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>WWW::RobotRules</samp></a><a href="http://search.cpan.org/dist/URI/" hreflang="en" xml:lang="en"><samp>URI</samp></a><a href="http://search.cpan.org/dist/HTML-Parser/" hreflang="en" xml:lang="en"><samp>HTML::LinkExtor</samp></a><span xml:lang="en">Bastian Kleineidam</span><a href="http://linkchecker.sourceforge.net/" hreflang="en" xml:lang="en"><samp>linkchecker</samp></a><span xml:lang="en">W3C-LinkChecker</span> <a href="http://validator.w3.org/checklink" hreflang="en" xml:lang="en"><samp>checklink</samp></a></p>
<h2>版权声明</h2>
<p>版权所有 &copy; 2003-2007 依玛猫。</p>
<p>本程式是自由软体,您可以遵照自由软体基金会 <span xml:lang="en">(Free Software Foundation)</span> 出版的 <cite><acronym title="GNU&rsquo;s Not UNIX" xml:lang="en">GNU</acronym> 通用公共许可证</cite>条款 <span xml:lang="en">(<cite><acronym title="GNU&rsquo;s Not UNIX">GNU</acronym> General Public License</cite>)</span> 第三版来修改和重新发布这一程式,或者自由选择使用任何更新的版本。</p>
<p>发布这一程式的目的是希望它有用,但没有任何担保。甚至没有适合特定目的而隐含的担保。更详细的情况请参阅 <cite><acronym title="GNU&rsquo;s Not UNIX" xml:lang="en">GNU</acronym> 通用公共许可证</cite></p>
<p>您应该已经和程式一起收到一份 <cite><acronym title="GNU&rsquo;s Not UNIX" xml:lang="en">GNU</acronym> 通用公共许可证</cite>的副本。如果还没有,参阅<samp>&lt;<a href="http://www.gnu.org/licenses/" hreflang="en">http://www.gnu.org/licenses/</a>&gt;</samp></p>
<h2>版本纪录</h2>
<p>请阅读 <samp xml:lang="en">NEWS</samp> 档,查看程式的演变、新增的功能和修补的错误。</p>
<h2>支援协助</h2>
<p><samp xml:lang="en">chklinks</samp> 网站架在 <a href="https://sourceforge.net/" hreflang="en" xml:lang="en">SourceForge</a><a href="http://www.cpan.org/" hreflang="en" xml:lang="en"><acronym title="Comprehensive Perl Archive Network">CPAN</acronym></a><a href="http://www.imacat.idv.tw/">旅舍依玛</a>。索取最新资讯,请驾临:</p>
<ul>
<li><p><a href="http://chklinks.sourceforge.net/"><span xml:lang="en">SourceForge</span> 上的 <samp xml:lang="en">chklinks</samp> 网站</a></p></li>
<li><p><a href="http://sourceforge.net/projects/chklinks/" hreflang="en"><samp xml:lang="en">chklinks</samp> <span xml:lang="en">SourceForge</span> 专案页</a></p></li>
<li><p><a href="http://search.cpan.org/dist/chklinks/" hreflang="en"><samp xml:lang="en">chklinks</samp> <acronym title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</acronym> 专案页</a></p></li>
<li><p><a href="http://www.imacat.idv.tw/tech/chklinks.html">旅舍依玛 <samp xml:lang="en">chklinks</samp> 网页</a></p></li>
</ul>
<p><a href="https://sourceforge.net/" hreflang="en" xml:lang="en">SourceForge</a> 上有一个 <a href="mailto:chklinks-users&#64;lists.sourceforge.net"><samp xml:lang="en">chklinks</samp> 的邮件通讯</a> 。使用上的问题、建议或错误回报,请提到通讯上讨论。它是 <a href="http://www.list.org/" hreflang="en" xml:lang="en">Mailman</a> 的邮件通讯。若要加入,请到 <a href="https://lists.sourceforge.net/lists/listinfo/chklinks-users" hreflang="en"><samp xml:lang="en">chklinks</samp> 邮件通讯的网页</a> 。你也可以写信到 <a href="mailto:chklinks-users-request&#64;lists.sourceforge.net"><acronym title="electronic mail" xml:lang="en">E-mail</acronym> 指令信箱</a>,标题填上 <samp xml:lang="en">help</samp> ,索取 <acronym title="electronic mail" xml:lang="en">E-mail</acronym> 指令说明。</p>
</div>
<hr />
<div id="footer" class="footer" title="页尾区">
<address><a href="mailto:imacat&#64;mail.imacat.idv.tw">依玛猫</a>,初稿 2003-05-25 ,上次更新日期 2008-11-18</address>
<address>版权所有 &copy; 2003-2008 依玛猫,欲转载引用请先阅读<a href="fdl.txt">版权声明</a></address>
</div>
</body>
</html>

480
chklinks.zh-tw.html Normal file
View File

@ -0,0 +1,480 @@
<?xml version="1.0" encoding="Big5" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-tw">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Big5" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta name="author" content="依瑪貓" />
<meta name="copyright" content="&copy; 2003-2008 依瑪貓。" />
<meta name="keywords" content="網站超連結檢查程式" />
<link rel="alternate" type="application/xhtml+xml" href="chklinks.zh-cn.html"
hreflang="zh-cn" title="&#31616;体中文" />
<link rel="alternate" type="application/xhtml+xml" href="chklinks.en.html"
hreflang="en-us" title="English" />
<link rel="copyright" type="text/plain" href="fdl.txt" />
<link rel="author" href="mailto:imacat&#64;mail.imacat.idv.tw" />
<style type="text/css">
h2, em {
text-transform: uppercase;
}
.accessguide {
font-size: 0.5em;
float: left;
width: 0.5em;
}
q {
quotes: "「" "」" "『" "』";
}
q:lang(en) {
quotes: "\201C" "\201D" "\2018" "\2019";
}
</style>
<title>chklinks 3.09 版</title>
</head>
<body>
<div class="langs" title="語言切換區">
<span>繁體中文</span> |
<span xml:lang="zh-cn"><a href="chklinks.zh-cn.html"
title="切&#25442;到本&#39029;&#31616;体中文版。"
hreflang="zh-cn">&#31616;体中文</a></span> |
<span xml:lang="en"><a href="chklinks.en.html"
title="Switch to the English version of this page."
hreflang="en-us">English</a></span>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1><samp xml:lang="en">chklinks</samp> 3.09 版</h1>
<h2>最新消息</h2>
<dl>
<dt>2007-12-06</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.09 。新版修正像 <span xml:lang="en"><abbr title="Microsoft">MS</abbr>-Windows</span> 之類不支援 <samp xml:lang="en">getpwuid()</samp> 呼叫的作業系統的問題。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.09.tar.gz" type="application/x-gzip">下載 <samp xml:lang="en">chklinks</samp> 3.09 版</a></p>
</dd>
<dt>2007-12-05</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.08 。新版修正好幾個說明文件的問題。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.08.tar.gz" type="application/x-gzip">下載 <samp xml:lang="en">chklinks</samp> 3.08 版</a></p>
</dd>
<dt>2007-12-05</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.07 。所需 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 版本號碼改用相容於舊版的號碼格式,以消除 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 5.10 的警告訊息。版權更新為 <a href="http://www.gnu.org/licenses/gpl-3.0.html" hreflang="en" xml:lang="en"><abbr title="GNU General Public License version 3" xml:lang="en">GPLv3</abbr></a><a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.07.tar.gz" type="application/x-gzip">下載 <samp xml:lang="en">chklinks</samp> 3.07 版</a></p>
</dd>
<dt>2007-06-08</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.06 。測試程式修正。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.06.tar.gz" type="application/x-gzip">下載 <samp xml:lang="en">chklinks</samp> 3.06 版</a></p>
</dd>
<dt>2007-06-07</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.05 。修正 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 5.8 版以前無 <abbr title="unicode translation format" xml:lang="en">UTF</abbr>-8 模式的問題。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.05.tar.gz" type="application/x-gzip">下載 <samp xml:lang="en">chklinks</samp> 3.05 版</a></p>
</dd>
<dt>2007-06-06</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.04 。修正說明文件。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.04.tar.gz" type="application/x-gzip">下載 <samp xml:lang="en">chklinks</samp> 3.04 版</a></p>
</dd>
<dt>2007-06-06</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.03 。修正 <a href="http://search.cpan.org/dist/HTML-Parser/" hreflang="en" xml:lang="en"><samp>HTML::Parser</samp></a> 的原始 <abbr title="unicode translation format" xml:lang="en">UTF</abbr>-8 警告訊息,加上支援以 <a href="http://search.cpan.org/dist/Module-Build/" hreflang="en" xml:lang="en"><samp>Module::Build</samp></a> 安裝。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.03.tar.gz" type="application/x-gzip">下載 <samp xml:lang="en">chklinks</samp> 3.03 版</a></p>
</dd>
<dt>2006-06-02</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.02 。更正錯誤的數位簽章。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.02.tar.gz" type="application/x-gzip">下載 <samp xml:lang="en">chklinks</samp> 3.02 版</a></p>
</dd>
<dt>2006-05-31</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.01 。修正 <samp xml:lang="en">Makefile.PL</samp> 漏掉的相依模組,並把漏掉的 <abbr title="HyperText Markup Language" xml:lang="en">HTML</abbr> 文件加回來。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.01.tar.gz" type="application/x-gzip">下載 <samp xml:lang="en">chklinks</samp> 3.01 版</a></p>
</dd>
<dt>2006-05-30</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 3.00 。改用 <a href="http://search.cpan.org/dist/HTML-Parser/" hreflang="en" xml:lang="en"><samp>HTML::LinkExtor</samp></a> 解讀網頁並用 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::RobotUA</samp></a> 連線取得網頁。支援 <samp xml:lang="en">http</samp> 外的其它網址格式。支援網站的 <span xml:lang="en">Cookies</span> 。遵守 <samp xml:lang="en">robots.txt</samp> 設定的規則。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-3.00.tar.gz" type="application/x-gzip">下載 <samp xml:lang="en">chklinks</samp> 3.00 版</a></p>
</dd>
<dt>2005-10-02</dt>
<dd>
<p>網站樣式調整,加上無障礙網頁的設計,以 <abbr title="Cascading StyleSheets" xml:lang="en">CSS</abbr> 邊框代替 <samp xml:lang="en">&lt;hr /&gt;</samp> ,以符合無障礙網頁空間的要求。</p>
</dd>
<dt>2005-04-27</dt>
<dd>
<p>網站上的<q>繁體中文</q>字樣更正為<q>正體中文</q></p>
</dd>
<dt>2003-05-26</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 2.02 。預設由檢查本頁就好,改為檢查整個網站。這樣比較符合大多數的需求。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-2.02.tar.gz" type="application/x-gzip">下載 <samp xml:lang="en">chklinks</samp> 2.02 版</a></p>
</dd>
<dt>2003-05-25</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 2.01 。加上安裝程式、附加檔案與 <abbr title="plain old document" xml:lang="en">POD</abbr> 說明檔。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-2.01.tar.gz" type="application/x-gzip">下載 <samp xml:lang="en">chklinks</samp> 2.01 版</a></p>
</dd>
<dt>2003-05-25</dt>
<dd>
<p><samp xml:lang="en">chklinks</samp> 最新版本 2.0.0 。首次公開上傳到 <span xml:lang="en">SourceForge</span> 。只有主程式。<a href="ftp://ftp.imacat.idv.tw/pub/chklinks/chklinks-2.0.0.tar.gz" type="application/x-gzip">下載 <samp xml:lang="en">chklinks</samp> 2.0.0 版</a></p>
</dd>
<dt>2003-05-19</dt>
<dd>
<p><span xml:lang="en">SourceForge</span> 專案通過。</p>
</dd>
<dt>2003-05-18</dt>
<dd>
<p>申請 <span xml:lang="en">SourceForge</span> 專案。</p>
</dd>
</dl>
<h2>說明</h2>
<p><dfn><samp xml:lang="en">chklinks</samp></dfn> 是單執行緒的 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 連結檢查程式,用來檢查網站上的超連結有沒有疏漏。</p>
<p><samp xml:lang="en">chklinks</samp><a href="http://linkchecker.sourceforge.net/" hreflang="en" xml:lang="en"><samp>linkchecker</samp></a> 不同之處在於,<samp xml:lang="en">chklinks</samp> 不是多執行緒的程式。 <samp xml:lang="en">chklinks</samp> 檢查時,不會同時啟動一大堆連線同步檢查,耗盡系統資源,導致當機。對大多數網管和使用者而言,這樣做安全得多。</p>
<p><samp xml:lang="en">chklinks</samp> 遵守 <samp xml:lang="en">robots.txt</samp> 設定的規則。若妳的網站拒絕自動網頁程式,導致 <samp xml:lang="en">chklinks</samp> 無法執行,請在妳的 <samp xml:lang="en">robots.txt</samp> ,加入下列兩行,放行 <samp xml:lang="en">chklinks</samp> </p>
<blockquote xml:lang="en"><pre>
User-agent: chklinks
Disallow:
</pre></blockquote>
<p><samp xml:lang="en">chklinks</samp> 使用 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::RobotUA</samp></a> 連線,支援下列通訊協定: <samp xml:lang="en">http</samp><samp xml:lang="en">https</samp><samp xml:lang="en">ftp</samp><samp xml:lang="en">gopher</samp><samp xml:lang="en">file</samp><samp xml:lang="en">chklinks</samp> 也可以檢查一般的檔案。(若要使用 <samp xml:lang="en">https</samp> 通訊協定,需先安裝 <a href="http://search.cpan.org/dist/Crypt-SSLeay/" hreflang="en" xml:lang="en"><samp>Crypt::SSLeay</samp></a> 。這是 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::RobotUA</samp></a> 的需求。)</p>
<p><samp xml:lang="en">chklinks</samp> 支援網站的 <span xml:lang="en">Cookies</span></p>
<h2>系統需求</h2>
<ol>
<li><p><acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 5.6 或以上。我還沒有在更早的版本上成功執行過。若妳可以在更早的版本上執行,請告訴我。妳可以輸入 <q xml:lang="en"><samp>perl -v</samp></q> 查詢妳目前的 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 版本。目前大多數的 <span xml:lang="en">Unix</span> 系統都有 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 。如果妳沒有 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 或需要昇級,可以到 <a href="http://www.perl.com/" hreflang="en"><acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 網站</a>下載安裝最新版 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 。若妳是用 <span xml:lang="en"><abbr title="Microsoft">MS</abbr>-Windows</span> ,可以下載安裝 <a href="http://www.activestate.com/" hreflang="en"><span xml:lang="en">ActiveState</span> 公司的 <span xml:lang="en">ActivePerl</span></a></p></li>
<li><p>需搭配的 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 模組:</p>
<dl>
<dt><a href="http://search.cpan.org/dist/URI/" hreflang="en" xml:lang="en"><samp>URI</samp></a></dt>
<dd>
<p>這是解析、處理網址用的。妳可以<a href="http://search.cpan.org/dist/URI/" hreflang="en"><acronym title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</acronym> 模組庫下載安裝 <samp xml:lang="en">URI</samp> </a>,或用 <span xml:lang="en"><samp>CPAN</samp> Shell</span> 執行 <q xml:lang="en"><samp>cpan URI</samp></q> 安裝,或用 <span xml:lang="en"><samp>CPANPLUS</samp> Shell</span> 執行 <q xml:lang="en"><samp>cpanp i URI</samp></q> 安裝。若妳是 <span xml:lang="en">Debian/Ubandu Linux</span> 使用者,可以執行 <q xml:lang="en"><samp>apt-get install liburi-perl</samp></q> 安裝。若妳是 <span xml:lang="en">Red Hat/Fedora/CentOS Linux</span> 使用者,可以執行 <q xml:lang="en"><samp>yum install perl-URI</samp></q> 安裝。若妳是 <span xml:lang="en">FreeBSD</span> 使用者,可以執行 <q xml:lang="en"><samp>ports install p5-URI</samp></q> 安裝。若妳是 <span xml:lang="en">ActivePerl</span> 使用者,可以執行 <q xml:lang="en"><samp>ppm install URI</samp></q> 安裝。</p>
</dd>
<dt><a href="http://search.cpan.org/dist/HTML-Parser/" hreflang="en" xml:lang="en"><samp>HTML::LinkExtor</samp></a></dt>
<dd>
<p>這是由網頁裏找出連結用的。 <samp xml:lang="en">HTML::LinkExtor</samp><a href="http://search.cpan.org/dist/HTML-Parser/" hreflang="en" xml:lang="en">HTML-Parser</a> 中的模組。妳可以<a href="http://search.cpan.org/dist/HTML-Parser/" hreflang="en"><acronym title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</acronym> 模組庫下載安裝 <samp xml:lang="en">HTML::LinkExtor</samp> </a>,或用 <span xml:lang="en"><samp>CPAN</samp> Shell</span> 執行 <q xml:lang="en"><samp>cpan HTML::LinkExtor</samp></q> 安裝,或用 <span xml:lang="en"><samp>CPANPLUS</samp> Shell</span> 執行 <q xml:lang="en"><samp>cpanp i HTML::LinkExtor</samp></q> 安裝。若妳是 <span xml:lang="en">Debian/Ubandu Linux</span> 使用者,可以執行 <q xml:lang="en"><samp>apt-get install libhtml-parser-perl</samp></q> 安裝。若妳是 <span xml:lang="en">Red Hat/Fedora/CentOS Linux</span> 使用者,可以執行 <q xml:lang="en"><samp>yum install perl-HTML-Parser</samp></q> 安裝。若妳是 <span xml:lang="en">FreeBSD</span> 使用者,可以執行 <q xml:lang="en"><samp>ports install p5-HTML-Parser</samp></q> 安裝。若妳是 <span xml:lang="en">ActivePerl</span> 使用者,可以執行 <q xml:lang="en"><samp>ppm install HTML::LinkExtor</samp></q> 安裝。</p>
</dd>
<dt><a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::RobotUA</samp></a></dt>
<dd>
<p>這是抓取網頁用的。 <samp xml:lang="en">LWP::RobotUA</samp><a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en">libwww-perl</a> 中的模組。妳可以<a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en"><acronym title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</acronym> 模組庫下載安裝 <samp xml:lang="en">LWP::RobotUA</samp> </a>,或用 <span xml:lang="en"><samp>CPAN</samp> Shell</span> 執行 <q xml:lang="en"><samp>cpan LWP::RobotUA</samp></q> 安裝,或用 <span xml:lang="en"><samp>CPANPLUS</samp> Shell</span> 執行 <q xml:lang="en"><samp>cpanp i LWP::RobotUA</samp></q> 安裝。若妳是 <span xml:lang="en">Debian/Ubandu Linux</span> 使用者,可以執行 <q xml:lang="en"><samp>apt-get install libwww-perl</samp></q> 安裝。若妳是 <span xml:lang="en">Red Hat/Fedora/CentOS Linux</span> 使用者,可以執行 <q xml:lang="en"><samp>yum install perl-libwww-perl</samp></q> 安裝。若妳是 <span xml:lang="en">FreeBSD</span> 使用者,可以執行 <q xml:lang="en"><samp>ports install p5-libwww</samp></q> 安裝。若妳是 <span xml:lang="en">ActivePerl</span> 使用者,可以執行 <q xml:lang="en"><samp>ppm install LWP::RobotUA</samp></q> 安裝。</p>
</dd>
</dl>
<p>若妳由 <samp xml:lang="en">CPAN</samp><span xml:lang="en"><samp>CPANPLUS</samp> Shell</span> 安裝 <samp xml:lang="en">chklinks</samp> ,會自動幫妳安裝以上所需的模組。</p>
</li>
<li><p>選配的 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 模組:</p>
<dl>
<dt><a href="http://search.cpan.org/dist/Crypt-SSLeay/" hreflang="en" xml:lang="en"><samp>Crypt::SSLeay</samp></a></dt>
<dd>
<p>這是要讓 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::RobotUA</samp></a> 支援 <abbr title="Hypertext Transfer Protocol over Secure Socket Layer" xml:lang="en">HTTPS</abbr> 的功能。妳可以<a href="http://search.cpan.org/dist/Crypt-SSLeay/" hreflang="en"><acronym title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</acronym> 模組庫下載安裝 <samp xml:lang="en">Crypt::SSLeay</samp> </a>,或用 <span xml:lang="en"><samp>CPAN</samp> Shell</span> 執行 <q xml:lang="en"><samp>cpan Crypt::SSLeay</samp></q> 安裝,或用 <span xml:lang="en"><samp>CPANPLUS</samp> Shell</span> 執行 <q xml:lang="en"><samp>cpanp i Crypt::SSLeay</samp></q> 安裝。若妳是 <span xml:lang="en">Debian/Ubandu Linux</span> 使用者,可以執行 <q xml:lang="en"><samp>apt-get install libcrypt-ssleay-perl</samp></q> 安裝。若妳是 <span xml:lang="en">Red Hat/Fedora/CentOS Linux</span> 使用者,可以執行 <q xml:lang="en"><samp>yum install perl-Crypt-SSLeay</samp></q> 安裝。若妳是 <span xml:lang="en">FreeBSD</span> 使用者,可以執行 <q xml:lang="en"><samp>ports install p5-Crypt-SSLeay</samp></q> 安裝。<a href="http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/Repository" hreflang="en">因加拿大聯邦政府的規定, <span xml:lang="en">ActiveState</span> 公司無法提供 <samp xml:lang="en">Crypt::SSLeay</samp><span xml:lang="en">ActivePerl <abbr title="Perl Package Manager">PPM</abbr></span> 套件安裝。</a>不過若妳是 <span xml:lang="en">ActivePerl</span> 使用者,還是可以改由其它套件庫,執行 <q xml:lang="en"><samp>ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd</samp></q> 安裝。</p>
</dd>
</dl>
</li>
</ol>
<h2>下載</h2>
<p><samp xml:lang="en">chklinks</samp> 的官方網站在:</p>
<ul>
<li><p><a href="http://chklinks.sourceforge.net/"><span xml:lang="en">SourceForge</span> 上的 <samp xml:lang="en">chklinks</samp> 網站</a></p></li>
<li><p><a href="http://sourceforge.net/projects/chklinks/" hreflang="en"><samp xml:lang="en">chklinks</samp> <span xml:lang="en">SourceForge</span> 專案頁</a></p></li>
<li><p><a href="http://search.cpan.org/dist/chklinks/" hreflang="en"><samp xml:lang="en">chklinks</samp> <abbr title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</abbr> 專案頁</a></p></li>
<li><p><a href="http://www.imacat.idv.tw/tech/chklinks.html">旅舍依瑪 <samp xml:lang="en">chklinks</samp> 網頁</a></p></li>
</ul>
<p>最新版 <samp xml:lang="en">chklinks</samp> 可由下列位址下載:</p>
<ul>
<li><p><a href="https://sourceforge.net/project/showfiles.php?group_id=81431" hreflang="en"><samp xml:lang="en">chklinks</samp> <span xml:lang="en">SourceForge</span> 下載頁</a></p></li>
<li><p><a href="http://search.cpan.org/dist/chklinks/" hreflang="en"><samp xml:lang="en">chklinks</samp> <abbr title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</abbr> 專案頁</a></p></li>
<li><p><a href="ftp://ftp.imacat.idv.tw/pub/chklinks/">旅舍依瑪 <abbr title="File Transfer Protocol" xml:lang="en">FTP</abbr></a></p></li>
</ul>
<p>依瑪貓的 <abbr title="Pretty Good Privacy" xml:lang="en">PGP</abbr> 公鑰在:</p>
<ul>
<li><p><a href="http://chklinks.sourceforge.net/pgpkey.asc" type="application/pgp-keys"><samp xml:lang="en">chklinks</samp> <span xml:lang="en">SourceForge</span> 網站上的依瑪貓 <abbr title="Pretty Good Privacy" xml:lang="en">PGP</abbr> 公鑰</a></p></li>
<li><p><a href="http://www.imacat.idv.tw/me/pgpkey.asc" type="application/pgp-keys">旅舍依瑪上的依瑪貓 <abbr title="Pretty Good Privacy" xml:lang="en">PGP</abbr> 公鑰</a></p></li>
</ul>
<h2>安裝</h2>
<h3><a href="http://search.cpan.org/dist/ExtUtils-MakeMaker/" hreflang="en" xml:lang="en"><samp>ExtUtils::MakeMaker</samp></a> 安裝</h3>
<p><samp xml:lang="en">chklinks</samp><acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 標準的 <a href="http://search.cpan.org/dist/ExtUtils-MakeMaker/" hreflang="en" xml:lang="en"><samp>ExtUtils::MakeMaker</samp></a> 安裝,程序如下:</p>
<blockquote xml:lang="en"><pre>
% perl Makefile.PL
% make
% make test
% make install
</pre></blockquote>
<p><q xml:lang="en"><samp>make install</samp></q> 前,請先確認妳有在安裝目錄存檔的權限。通常這時候要切換為 <samp xml:lang="en">root</samp> ,才能安裝存檔。</p>
<p>若妳是用 <span xml:lang="en"><abbr title="Microsoft">MS</abbr>-Windows</span> 下的 <span xml:lang="en">ActivePerl</span> <samp xml:lang="en">make</samp> 請改用 <samp xml:lang="en">nmake</samp><a href="ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe" type="application/x-dosexec"><samp xml:lang="en">nmake</samp>
由微軟的 <abbr title="File Transfer Protocol" xml:lang="en">FTP</abbr> 站下載</a></p>
<p>若要安裝到其它地方,請設定好 <samp xml:lang="en">PREFIX</samp> 。例如,一般使用者,要安裝在自己的目錄下時:</p>
<blockquote xml:lang="en"><pre>
% perl Makefile.PL PREFIX=/home/jessica
</pre></blockquote>
<p>要知道更多安裝選項的細節,請參閱 <a href="http://search.cpan.org/dist/ExtUtils-MakeMaker/" hreflang="en" xml:lang="en"><samp>ExtUtils::MakeMaker</samp></a> 的說明(請執行 <q xml:lang="en"><samp>perldoc ExtUtils::MakeMaker</samp></q> )。</p>
<h3><a href="http://search.cpan.org/dist/Module-Build/" hreflang="en" xml:lang="en"><samp>Module::Build</samp></a> 安裝</h3>
<p>若妳喜歡,也可以用 <a href="http://search.cpan.org/dist/Module-Build/" hreflang="en" xml:lang="en"><samp>Module::Build</samp></a> 安裝,程序如下:</p>
<blockquote xml:lang="en"><pre>
% perl Build.PL
% ./Build
% ./Build test
% ./Build install
</pre></blockquote>
<p><q xml:lang="en"><samp>./Build install</samp></q> 前,請先確認妳有在安裝目錄存檔的權限。通常這時候要切換為 <samp xml:lang="en">root</samp> ,才能安裝存檔。</p>
<p>若要安裝到其它地方,請設定好 <samp xml:lang="en">--prefix</samp> 。例如,一般使用者,要安裝在自己的目錄下時:</p>
<blockquote xml:lang="en"><pre>
% perl Build.PL --prefix=/home/jessica
</pre></blockquote>
<p>要知道更多安裝選項的細節,請參閱 <a href="http://search.cpan.org/dist/Module-Build/" hreflang="en" xml:lang="en"><samp>Module::Build</samp></a> 的說明(請執行 <q xml:lang="en"><samp>perldoc Module::Build</samp></q> )。</p>
<h2>命令列參數</h2>
<pre>
./chklinks [參數] <var>網址1</var> [<var>網址2</var> [<var>網址3</var> &hellip;]]
./chklinks [-h|-v]
</pre>
<dl>
<dt xml:lang="en">-1,--onelevel</dt>
<dd>
<p>檢查本頁就好,不繼續查下去。</p>
</dd>
<dt xml:lang="en">-r,--recursive</dt>
<dd>
<p>檢查完整個網站。預設是 <samp xml:lang="en">--recursive</samp></p>
</dd>
<dt xml:lang="en">-b,--below</dt>
<dd>
<p>只檢查該目錄下的連結。預設是 <samp xml:lang="en">--below</samp></p>
</dd>
<dt xml:lang="en">-p,--parent</dt>
<dd>
<p>上溯到全站的連結。</p>
</dd>
<dt xml:lang="en">-l,--local</dt>
<dd>
<p>只檢查站上的連結,不檢查站外連結。</p>
</dd>
<dt xml:lang="en">-s,--span</dt>
<dd>
<p>檢查站外的連結(但不會查下去)。預設是 <samp xml:lang="en">--span</samp></p>
</dd>
<dt xml:lang="en">-e,--exclude <var xml:lang="zh-tw">路徑</var></dt>
<dd>
<p>排除該路逕。把該路徑下的檔案當成站外連結,只檢查能不能連,不深入查下去。妳可以指定很多個 <samp xml:lang="en">--exclude</samp></p>
</dd>
<dt xml:lang="en">-i,--include <var xml:lang="zh-tw">路徑</var></dt>
<dd>
<p>包含該路逕。和 <samp xml:lang="en">--exclude</samp> 效果相反,用來抵銷 <samp xml:lang="en">--exclude</samp> 。排後面的優先處理。</p>
</dd>
<dt xml:lang="en">-d,--debug</dt>
<dd>
<p>顯示詳細的執行訊息。越多個 <samp xml:lang="en">--debug</samp> ,訊息越詳細。</p>
</dd>
<dt xml:lang="en">-q,--quiet</dt>
<dd>
<p>關閉執行訊息。和 <samp xml:lang="en">--debug</samp> 效果相反,用來抵銷 <samp xml:lang="en">--debug</samp></p>
</dd>
<dt xml:lang="en">-h, --help</dt>
<dd>
<p>顯示程式說明。</p>
</dd>
<dt xml:lang="en">-v, --version</dt>
<dd>
<p>顯示程式版本。</p>
</dd>
<dt xml:lang="en"><var xml:lang="zh-tw">網址1</var>, <var xml:lang="zh-tw">網址2</var>, <var xml:lang="zh-tw">網址3</var></dt>
<dd>
<p>要檢查的網站網址。</p>
</dd>
</dl>
<h2>注意事項</h2>
<ul>
<li><p><samp xml:lang="en">chklinks</samp> 尚未遵守 <samp xml:lang="en">robots.txt</samp><a href="http://help.yahoo.com/help/us/ysearch/slurp/slurp-03.html" hreflang="en" xml:lang="en"><samp>Crawl-delay:</samp></a> 規則。不過這是 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>WWW::RobotRules</samp></a> 的問題,不是 <samp xml:lang="en">chklinks</samp> 的問題。</p></li>
<li><p>若出現以下警告:</p>
<blockquote xml:lang="en">
<pre>Parsing of undecoded UTF-8 will give garbage when decoding entities at /usr/share/perl5/LWP/Protocol.pm line 114.</pre>
</blockquote>
<p>這是 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::Protocol</samp></a> 1.43 版或之前的版本( <samp>libwww-perl</samp> 5.805 版或之前的版本),碰上 <a href="http://search.cpan.org/dist/HTML-Parser/" hreflang="en" xml:lang="en"><samp>HTML::Parser</samp></a> 3.40 版或之後的版本及 <acronym title="Practical Extraction and Reporting Language" xml:lang="en">Perl</acronym> 5.8 版或之後的版本時,產生的問題。 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::Protocol</samp></a> 1.46 版以後( <samp>libwww-perl</samp> 5.806 版以後),已解決這個問題。請昇級到最新版的 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::Protocol</samp></a> 。若妳因故無法昇級,請參閱 <a href="http://rt.cpan.org/Public/Bug/Display.html?id=20274" hreflang="en" xml:lang="en"><acronym title="Comprehensive Perl Archive Network">CPAN</acronym> RT Bug#20274 報告</a>,取得 <a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::Protocol</samp></a> 的修補程式。</p>
</li>
</ul>
<h2>參考資料</h2>
<p><a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::UserAgent</samp></a><a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>LWP::RobotUA</samp></a><a href="http://search.cpan.org/dist/libwww-perl/" hreflang="en" xml:lang="en"><samp>WWW::RobotRules</samp></a><a href="http://search.cpan.org/dist/URI/" hreflang="en" xml:lang="en"><samp>URI</samp></a><a href="http://search.cpan.org/dist/HTML-Parser/" hreflang="en" xml:lang="en"><samp>HTML::LinkExtor</samp></a><span xml:lang="en">Bastian Kleineidam</span><a href="http://linkchecker.sourceforge.net/" hreflang="en" xml:lang="en"><samp>linkchecker</samp></a><span xml:lang="en">W3C-LinkChecker</span> <a href="http://validator.w3.org/checklink" hreflang="en" xml:lang="en"><samp>checklink</samp></a></p>
<h2>版權聲明</h2>
<p>版權所有 &copy; 2003-2007 依瑪貓。</p>
<p>本程式是自由軟體,您可以遵照自由軟體基金會 <span xml:lang="en">(Free Software Foundation)</span> 出版的 <cite><acronym title="GNU&rsquo;s Not UNIX" xml:lang="en">GNU</acronym> 通用公共許可證</cite>條款 <span xml:lang="en">(<cite><acronym title="GNU&rsquo;s Not UNIX">GNU</acronym> General Public License</cite>)</span> 第三版來修改和重新發佈這一程式,或者自由選擇使用任何更新的版本。</p>
<p>發佈這一程式的目的是希望它有用,但沒有任何擔保。甚至沒有適合特定目的而隱含的擔保。更詳細的情況請參閱 <cite><acronym title="GNU&rsquo;s Not UNIX" xml:lang="en">GNU</acronym> 通用公共許可證</cite></p>
<p>您應該已經和程式一起收到一份 <cite><acronym title="GNU&rsquo;s Not UNIX" xml:lang="en">GNU</acronym> 通用公共許可證</cite>的副本。如果還沒有,參閱<samp>&lt;<a href="http://www.gnu.org/licenses/" hreflang="en">http://www.gnu.org/licenses/</a>&gt;</samp></p>
<h2>版本紀錄</h2>
<p>請閱讀 <samp xml:lang="en">NEWS</samp> 檔,查看程式的演變、新增的功能和修補的錯誤。</p>
<h2>支援協助</h2>
<p><samp xml:lang="en">chklinks</samp> 網站架在 <a href="https://sourceforge.net/" hreflang="en" xml:lang="en">SourceForge</a><a href="http://www.cpan.org/" hreflang="en" xml:lang="en"><acronym title="Comprehensive Perl Archive Network">CPAN</acronym></a><a href="http://www.imacat.idv.tw/">旅舍依瑪</a>。索取最新資訊,請駕臨:</p>
<ul>
<li><p><a href="http://chklinks.sourceforge.net/"><span xml:lang="en">SourceForge</span> 上的 <samp xml:lang="en">chklinks</samp> 網站</a></p></li>
<li><p><a href="http://sourceforge.net/projects/chklinks/" hreflang="en"><samp xml:lang="en">chklinks</samp> <span xml:lang="en">SourceForge</span> 專案頁</a></p></li>
<li><p><a href="http://search.cpan.org/dist/chklinks/" hreflang="en"><samp xml:lang="en">chklinks</samp> <acronym title="Comprehensive Perl Archive Network" xml:lang="en">CPAN</acronym> 專案頁</a></p></li>
<li><p><a href="http://www.imacat.idv.tw/tech/chklinks.html">旅舍依瑪 <samp xml:lang="en">chklinks</samp> 網頁</a></p></li>
</ul>
<p><a href="https://sourceforge.net/" hreflang="en" xml:lang="en">SourceForge</a> 上有一個 <a href="mailto:chklinks-users&#64;lists.sourceforge.net"><samp xml:lang="en">chklinks</samp> 的郵件通訊</a> 。使用上的問題、建議或錯誤回報,請提到通訊上討論。它是 <a href="http://www.list.org/" hreflang="en" xml:lang="en">Mailman</a> 的郵件通訊。若要加入,請到 <a href="https://lists.sourceforge.net/lists/listinfo/chklinks-users" hreflang="en"><samp xml:lang="en">chklinks</samp> 郵件通訊的網頁</a> 。妳也可以寫信到 <a href="mailto:chklinks-users-request&#64;lists.sourceforge.net"><acronym title="electronic mail" xml:lang="en">E-mail</acronym> 指令信箱</a>,標題填上 <samp xml:lang="en">help</samp> ,索取 <acronym title="electronic mail" xml:lang="en">E-mail</acronym> 指令說明。</p>
</div>
<hr />
<div id="footer" class="footer" title="頁尾區">
<address><a href="mailto:imacat&#64;mail.imacat.idv.tw">依瑪貓</a>,初稿 2003-05-25 ,上次更新日期 2008-11-18</address>
<address>版權所有 &copy; 2003-2008 依瑪貓,欲轉載引用請先閱讀<a href="fdl.txt">版權聲明</a></address>
</div>
</body>
</html>

397
fdl.txt Normal file
View File

@ -0,0 +1,397 @@
GNU Free Documentation License
Version 1.2, November 2002
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other
functional and useful document "free" in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or noncommercially.
Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible
for modifications made by others.
This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be
distributed under the terms of this License. Such a notice grants a
world-wide, royalty-free license, unlimited in duration, to use that
work under the conditions stated herein. The "Document", below,
refers to any such manual or work. Any member of the public is a
licensee, and is addressed as "you". You accept the license if you
copy, modify or distribute the work in a way requiring permission
under copyright law.
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject. (Thus, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The "Invariant Sections" are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License. If a
section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant. The Document may contain zero
Invariant Sections. If the Document does not identify any Invariant
Sections then there are none.
The "Cover Texts" are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License. A Front-Cover Text may
be at most 5 words, and a Back-Cover Text may be at most 25 words.
A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup, or absence of markup, has been arranged to thwart
or discourage subsequent modification by readers is not Transparent.
An image format is not Transparent if used for any substantial amount
of text. A copy that is not "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML, PostScript or PDF designed for human modification. Examples of
transparent image formats include PNG, XCF and JPG. Opaque formats
include proprietary formats that can be read and edited only by
proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML, PostScript or PDF produced by some word
processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, "Title Page" means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
A section "Entitled XYZ" means a named subunit of the Document whose
title either is precisely XYZ or contains XYZ in parentheses following
text that translates XYZ in another language. (Here XYZ stands for a
specific section name mentioned below, such as "Acknowledgements",
"Dedications", "Endorsements", or "History".) To "Preserve the Title"
of such a section when you modify the Document means that it remains a
section "Entitled XYZ" according to this definition.
The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document. These Warranty
Disclaimers are considered to be included by reference in this
License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and has
no effect on the meaning of this License.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a computer-network location from which the general network-using
public has access to download using public-standard network protocols
a complete Transparent copy of the Document, free of added material.
If you use the latter option, you must take reasonably prudent steps,
when you begin distribution of Opaque copies in quantity, to ensure
that this Transparent copy will remain thus accessible at the stated
location until at least one year after the last time you distribute an
Opaque copy (directly or through your agents or retailers) of that
edition to the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has fewer than five),
unless they release you from this requirement.
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
F. Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled "History", Preserve its Title, and add
to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section Entitled "History" in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the "History" section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
K. For any section Entitled "Acknowledgements" or "Dedications",
Preserve the Title of the section, and preserve in the section all
the substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
M. Delete any section Entitled "Endorsements". Such a section
may not be included in the Modified Version.
N. Do not retitle any existing section to be Entitled "Endorsements"
or to conflict in title with any Invariant Section.
O. Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
You may add a section Entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled "History"
in the various original documents, forming one section Entitled
"History"; likewise combine any sections Entitled "Acknowledgements",
and any sections Entitled "Dedications". You must delete all sections
Entitled "Endorsements".
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, is called an "aggregate" if the copyright
resulting from the compilation is not used to limit the legal rights
of the compilation's users beyond what the individual works permit.
When the Document is included in an aggregate, this License does not
apply to the other works in the aggregate which are not themselves
derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half of
the entire aggregate, the Document's Cover Texts may be placed on
covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic form.
Otherwise they must appear on printed covers that bracket the whole
aggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions
of those notices and disclaimers. In case of a disagreement between
the translation and the original version of this License or a notice
or disclaimer, the original version will prevail.
If a section in the Document is Entitled "Acknowledgements",
"Dedications", or "History", the requirement (section 4) to Preserve
its Title (section 1) will typically require changing the actual
title.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License. Any other attempt to
copy, modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License "or any later version" applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
Copyright (c) YEAR YOUR NAME.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the "with...Texts." line with this:
with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.

40
pgpkey.asc Normal file
View File

@ -0,0 +1,40 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.1 (GNU/Linux)
mQGiBD0kfGQRBADaGggoSHTZ8P17j92IMMxWPpML0TdvbhzW5iFF7a5th0xCn9od
pHVwc2YxuEulwDz0LJUx2IwwbttftHcJafcH51vk57Qq2+hvNAE1o9a/MWReMIwv
KfBi3Q1bVxWIjVPDbHd+ZUbbo0pozbfrHEaRPQ0qR+/ZgK5+V6WJiLElrwCgsCQy
FGfo72h5p46w7MrW4qSmalkD/RMcVmPkszF5J0N9pWlgcJ/fTYlMKIit3V/W/fru
L4KkUT3d9CMcJSBZrcVlXlDbPeBF8L7vl46NImd4xfnRKLwOuAy67Tld6CbC+UWz
rv6472rGetTTaj7iBH5nR62BQUmaLK6W6Q8vFOrqIBqXEz5iJ+RLYpIxH5M8gOz5
7b7GBACIZaPaMVzIbTqnysDCgKEQqOyFbpgcGfSH52xH3XXeNrJhuenJFvBbeV8J
RgmKSnn1ZixFHJ261uGu5kOA1CQemNrTgZRaeHDu6mdZALdbxpLXp9DeOC/oTUWa
1O2xmAWcZZo+63s0MciC9zDrRjlNuGcVOiHZZLh9P9vEfoJos7Qu5L6d55Gq6LKT
IChpbWFjYXQpIDxpbWFjYXRAbWFpbC5pbWFjYXQuaWR2LnR3PoheBBMRAgAeBQJC
iLwmAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJEIvYLm8wuUtcmnYAnRQCNXWc
vgtk4CiTTBWqGWWZRjViAKCn/F6maM9R5RzuC1L5ER27f0AjbrkEDQQ9JHzZEBAA
owxPPj1TOZKGuav0eKopd8RrwFQ51P0FY85WyTAsCWg/KGcJIXFKwJ/r4U381iQd
z+16+E6oOzTIs/iwnkSKmfWx2M46uXdIa/VkLChZzHpCVDHeVICGE5sbECNS2gYD
CRx/Jl/FnXNaeaI0RZm3i4gf204bvqsPm+epI/BOW4cZmbkqSd4BuG2/i7y/BZzP
NhVseNVe2qhWFxs4Hj5S6y6xYSuuPLC4mZrkA7x1J9tq+wUt6z0mwIdRhEaK5iE5
PB44XiwGKW02sLt5CQXDW/DbqXlyu6VP90iVjWLg0ftI28dULipw2n6u0DIGIxfL
i4dDf0gcYyqDF++aMWYTlB7a89Vt055dp7NC59VaqltW9DgKnxkiTUMxZ3HtqA67
rwKtwKY3CQyuIYil31AQy0izi4fIu6MRznLtwHAfaqsB0Nej+kFl1XSUspe3P6ea
YzMs7on0X0KvPDWPo7AMz0Y/ex/XzYwR2+IzijTnaakH5TS7da0LKXb3FTV/PuIR
UgH3P/yOwRyOU4VLWqcyLxBJuMlX1WVz3UdNfHwRfm+jqPktP0qnQ9ZrFk3VEOGv
0hMvCeqj3Vw5CziYCTm3YiDG4OLPpUN3ByF944cUCYKwoGYEUKUf0vXPvUYdshqB
D49RyI0oy2nZstSt+iVefuCyWBYEyqIDu0eRGWY8FRMAAwUQAI/jMOnq6mP7mfbs
qq1ugXtx0r7cKNge0ebB/TA37ZLCo2UTdoxk/AsuGx1MK6kKJh3Zkxz89jb84CXA
jZbYbLOGhFioHCyiqfJwFbR7Abhsoo1NuEAtibJpFUm0oHym/Tjc4Xwht7cf52+8
USfC918mFzmbPDOuIpkcHjGzXFztgDiMlX7iDrMvX2QOLzhp+g/I/pyAhAcKH8Eo
vcKeYOoQIM7hpP0eTZxgCDdRw9SpodU0/rTL6UzA4iXMcqncspH0OjfT5gxj3cOo
ofhaPxsIoqllZA/V/x7CeykdNE5L5SYv3c0NBnTMe9kV4K8V0JHTyz7N3ipiWJHP
VObvgdrJyA9YYCpgorfE7a1rtmLPfr5evrTuKP+VMEInqvA0mAxzX/HsbtsA+bNn
g6c5WibjO/kDKgfZfHFrPlLPiSSBVn9ygEySdlBuXpb5c7wft/YV0FyVAikbhY3l
3jJYmQ7kBxrtoIH9jK6Ff8rw7qbyBg6fDPoC3gevNdmoVtk5vTcKQTxPKlCeXTtE
JYfKDvX0BDkV8Wdizit03Sp0StpeietlX5vYQDyefp+w5J3k2SrbkEczzGZzXHq/
5pm36cC0N0rA8ZW7JOpkThjZIJ733Y5DwtzhWqdUubWiCMmC7HfGmpI0OdV6QF8p
kCKXIsJ90Uiep0lEDNQZg4Y96kuUiEYEGBECAAYFAj0kfNoACgkQi9gubzC5S1xO
uACdELzJCBgMJVZ9siHwn48X2rXdQnIAn0yagIZfaIS0CfCamwcYeMfKcQQV
=GeL3
-----END PGP PUBLIC KEY BLOCK-----

22
t/00-signature.t Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/perl
use strict;
print "1..1\n";
if (!-s 'SIGNATURE') {
print "ok 1 # skip No signature file found\n";
}
elsif (!eval { require Module::Signature; 1 }) {
print "ok 1 # skip ",
"Next time around, consider install Module::Signature, ",
"so you can verify the integrity of this distribution.\n";
}
elsif (!eval { require Socket; Socket::inet_aton('pgp.mit.edu') }) {
print "ok 1 # skip Cannot connect to the keyserver\n";
}
else {
(Module::Signature::verify() == Module::Signature::SIGNATURE_OK())
or print "not ";
print "ok 1 # Valid signature\n";
}
__END__

103
t/01-basic.t Executable file
View File

@ -0,0 +1,103 @@
#! /usr/bin/perl -w
# Basic test suite
#
# Copyright (c) 2003-2007 imacat.
#
# 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/>.
use 5.006;
use strict;
use Test;
BEGIN { plan tests => 21 }
use FindBin;
use File::Spec::Functions qw(catdir updir);
use File::Spec qw();
use lib $FindBin::Bin;
use vars qw($chklinks $start);
$chklinks = catdir($FindBin::Bin, updir, "blib", "script", "chklinks");
$start = catdir($FindBin::Bin, "htdocs", "dir01", "start.html");
# one level, locally, only below
eval {
@_ = `$chklinks -1 -l -q $start`;
$_ = join "", @_;
};
# 1
ok($@, "");
# 2
ok(scalar(@_), 1);
# 3
ok($_, qr/test02.html/);
# one level, locally, check parent
eval {
@_ = `$chklinks -1 -l -p -q $start`;
$_ = join "", @_;
};
# 4
ok($@, "");
# 5
ok(scalar(@_), 3);
# 6
ok($_, qr/test2.css/);
# 7
ok($_, qr/test02.html/);
# 8
ok($_, qr/test04.html/);
# recursive, locally, only below
eval {
@_ = `$chklinks -l -q $start`;
$_ = join "", @_;
};
# 9
ok($@, "");
# 10
ok(scalar(@_), 2);
# 11
ok($_, qr/test02.html/);
# 12
ok($_, qr/test3.css/);
# recursive, span remote, only below
eval {
@_ = `$chklinks -q $start`;
$_ = join "", @_;
};
# 13
ok($@, "");
# 14
ok(scalar(@_), 6);
# 15
ok($_, qr/test02\.html /);
s/^.*test02.html [^\n]*\n//m;
# 16
ok($_, qr/test3\.css /);
s/^.*test3.css [^\n]*\n//m;
# 17
ok($_, qr/^http:\/\/www\.yahoo\.com\/nonexistent /m);
s/^http:\/\/www\.yahoo\.com\/nonexistent [^\n]*\n//m;
# 18
ok($_, qr/^http:\/\/www\.domain\.invalid\/ /m);
s/^http:\/\/www\.domain\.invalid\/ [^\n]*\n//m;
# 19
ok($_, qr/^ftp:\/\/ftp\.cpan\.org\/nonexistent /m);
s/^ftp:\/\/ftp\.cpan\.org\/nonexistent [^\n]*\n//m;
# 20
ok($_, qr/^ftp:\/\/ftp\.domain\.invalid\/ /m);
s/^ftp:\/\/ftp\.domain\.invalid\/ [^\n]*\n//m;
# 21
ok($_, "");

5
t/99-pod.t Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/perl
use Test::More;
eval "use Test::Pod 1.00";
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
all_pod_files_ok();

24
t/htdocs/dir01/start.html Normal file
View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<link rel="stylesheet" type="text/css" href="../stylesheets/test.css" />
<link rel="stylesheet" type="text/css" href="../stylesheets/test2.css" />
<title>Test Start</title>
</head>
<body>
<h1>Test Start</h1>
<p xml:lang="zh-tw">這是一頁測試網頁。</p>
<ul>
<li><a href="test01.html">Test #01</a></li>
<li><a href="test02.html">Test #02</a></li>
<li><a href="../test03.html">Test #03</a></li>
<li><a href="../test04.html">Test #04</a></li>
</ul>
</body>
</html>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="US-ASCII" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<link rel="stylesheet" type="text/css" href="../stylesheets/test.css" />
<link rel="stylesheet" type="text/css" href="test3.css" />
<title>Test #01</title>
</head>
<body>
<h1>Test #01</h1>
<ul>
<li><a href="http://www.cpan.org/"><acronym title="Comprehensive Perl Archive Network">CPAN</acronym></a></li>
<li><a href="http://www.yahoo.com/nonexistent">Non-existing HTTP</a></li>
<li><a href="http://www.domain.invalid/">Non-existing HTTP host</a></li>
<li><a href="ftp://ftp.cpan.org/"><acronym title="Comprehensive Perl Archive Network">CPAN</acronym> FTP</a></li>
<li><a href="ftp://ftp.cpan.org/nonexistent">Non-existing FTP</a></li>
<li><a href="ftp://ftp.domain.invalid/">Non-existing FTP host</a></li>
</ul>
</body>
</html>

View File

@ -0,0 +1,3 @@
p {
text-indent: 0.5in;
}

14
t/htdocs/test03.html Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="US-ASCII" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<link rel="stylesheet" type="text/css" href="../stylesheets/test.css" />
<title>Test #03</title>
</head>
<body>
<h1>Test #03</h1>
</body>
</html>