From a5c281b7e3717c058803767325697c40a1458a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Fri, 5 Feb 2021 22:43:13 +0800 Subject: [PATCH] Initial commit. --- AUTHORS | 1 + AUTHORS.zh-cn | 1 + AUTHORS.zh-tw | 1 + Build.PL | 35 ++ COPYING | 674 +++++++++++++++++++++++++++ Changes | 261 +++++++++++ INSTALL | 166 +++++++ INSTALL.zh-cn | 153 +++++++ INSTALL.zh-tw | 153 +++++++ MANIFEST | 36 ++ META.yml | 18 + Makefile.PL | 46 ++ NEWS | 56 +++ README | 69 +++ README.zh-cn | 64 +++ README.zh-tw | 64 +++ SIGNATURE | 58 +++ THANKS | 14 + THANKS.zh-cn | 11 + THANKS.zh-tw | 11 + TODO | 16 + TODO.zh-cn | 15 + TODO.zh-tw | 15 + chklinks | 838 ++++++++++++++++++++++++++++++++++ chklinks.en.html | 477 +++++++++++++++++++ chklinks.zh-cn.html | 477 +++++++++++++++++++ chklinks.zh-tw.html | 480 +++++++++++++++++++ fdl.txt | 397 ++++++++++++++++ pgpkey.asc | 40 ++ t/00-signature.t | 22 + t/01-basic.t | 103 +++++ t/99-pod.t | 5 + t/htdocs/dir01/start.html | 24 + t/htdocs/dir01/test01.html | 24 + t/htdocs/stylesheets/test.css | 3 + t/htdocs/test03.html | 14 + 36 files changed, 4842 insertions(+) create mode 100644 AUTHORS create mode 100644 AUTHORS.zh-cn create mode 100644 AUTHORS.zh-tw create mode 100755 Build.PL create mode 100644 COPYING create mode 100644 Changes create mode 100644 INSTALL create mode 100644 INSTALL.zh-cn create mode 100644 INSTALL.zh-tw create mode 100644 MANIFEST create mode 100644 META.yml create mode 100755 Makefile.PL create mode 100644 NEWS create mode 100644 README create mode 100644 README.zh-cn create mode 100644 README.zh-tw create mode 100644 SIGNATURE create mode 100644 THANKS create mode 100644 THANKS.zh-cn create mode 100644 THANKS.zh-tw create mode 100644 TODO create mode 100644 TODO.zh-cn create mode 100644 TODO.zh-tw create mode 100755 chklinks create mode 100644 chklinks.en.html create mode 100644 chklinks.zh-cn.html create mode 100644 chklinks.zh-tw.html create mode 100644 fdl.txt create mode 100644 pgpkey.asc create mode 100755 t/00-signature.t create mode 100755 t/01-basic.t create mode 100755 t/99-pod.t create mode 100644 t/htdocs/dir01/start.html create mode 100644 t/htdocs/dir01/test01.html create mode 100644 t/htdocs/stylesheets/test.css create mode 100644 t/htdocs/test03.html diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..d6c1a2a --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +imacat diff --git a/AUTHORS.zh-cn b/AUTHORS.zh-cn new file mode 100644 index 0000000..2e02909 --- /dev/null +++ b/AUTHORS.zh-cn @@ -0,0 +1 @@ +依玛猫 diff --git a/AUTHORS.zh-tw b/AUTHORS.zh-tw new file mode 100644 index 0000000..2ec7e15 --- /dev/null +++ b/AUTHORS.zh-tw @@ -0,0 +1 @@ +ㄌ嚎窟 diff --git a/Build.PL b/Build.PL new file mode 100755 index 0000000..9d13513 --- /dev/null +++ b/Build.PL @@ -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 ", + 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__ diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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. + + + Copyright (C) + + 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 . + +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: + + Copyright (C) + 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 +. + + 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 +. diff --git a/Changes b/Changes new file mode 100644 index 0000000..610e4cf --- /dev/null +++ b/Changes @@ -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 ... 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

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 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. diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..becf680 --- /dev/null +++ b/INSTALL @@ -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/ diff --git a/INSTALL.zh-cn b/INSTALL.zh-cn new file mode 100644 index 0000000..fdbcaa1 --- /dev/null +++ b/INSTALL.zh-cn @@ -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/ diff --git a/INSTALL.zh-tw b/INSTALL.zh-tw new file mode 100644 index 0000000..870a8e2 --- /dev/null +++ b/INSTALL.zh-tw @@ -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/ diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..ef4408a --- /dev/null +++ b/MANIFEST @@ -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 diff --git a/META.yml b/META.yml new file mode 100644 index 0000000..2a46000 --- /dev/null +++ b/META.yml @@ -0,0 +1,18 @@ +--- #YAML:1.0 +name: chklinks +version: 3.09 +abstract: A non-threaded Perl link checker +license: gpl +author: + - imacat +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 diff --git a/Makefile.PL b/Makefile.PL new file mode 100755 index 0000000..a358ff9 --- /dev/null +++ b/Makefile.PL @@ -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 ", + 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__ diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..837230f --- /dev/null +++ b/NEWS @@ -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: diff --git a/README b/README new file mode 100644 index 0000000..8abeec4 --- /dev/null +++ b/README @@ -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 . + + 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 +2007-12-05 +imacat@mail.imacat.idv.tw +http://www.imacat.idv.tw/ diff --git a/README.zh-cn b/README.zh-cn new file mode 100644 index 0000000..1ed3ca5 --- /dev/null +++ b/README.zh-cn @@ -0,0 +1,64 @@ +chklinks - 单执行绪的 Perl 连结检查程式。 + + 版权所有 (c) 2003-2007 依玛猫 + + 本程式是自由软体,您可以遵照自由软体基金会 (Free Software Foundation) + 出版的 GNU 通用公共许可证条款 (GNU General Public License) 第三版来修 + 改和重新发布这一程式,或者自由选择使用任何更新的版本。 + + 发布这一程式的目的是希望它有用,但没有任何担保。甚至没有适合特定目的 + 而隐含的担保。更详细的情况请参阅 GNU 通用公共许可证。 + + 您应该已经和程式一起收到一份 GNU 通用公共许可证的副本。如果还没有,参 + 阅。 + + 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 ^_*' +2007-12-05 +imacat@mail.imacat.idv.tw +http://www.imacat.idv.tw/ diff --git a/README.zh-tw b/README.zh-tw new file mode 100644 index 0000000..8f71049 --- /dev/null +++ b/README.zh-tw @@ -0,0 +1,64 @@ +chklinks - 虫磅︽狐 Perl 硈挡浪琩祘Α + + 舦┮Τ (c) 2003-2007 ㄌ嚎窟 + + セ祘Α琌パ硁砰眤宽酚パ硁砰膀穦 (Free Software Foundation) +  GNU 硄ノそ砛靡兵蹿 (GNU General Public License) 材ㄓ + э㎝穝祇硂祘Α┪パ匡拒ㄏノヴ穝セ + + 祇硂祘Αヘ琌辨ウΤノ⊿Τヴ踞玂⊿Τ続疭﹚ヘ + τ留踞玂冈灿薄猵叫把綷 GNU 硄ノそ砛靡 + + 眤莱赣竒㎝祘Α癬Μ GNU 硄ノそ砛靡捌セ狦临⊿Τ把 + 綷 + + 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 ^_*' +2007-12-05 +imacat@mail.imacat.idv.tw +http://www.imacat.idv.tw/ diff --git a/SIGNATURE b/SIGNATURE new file mode 100644 index 0000000..1efd592 --- /dev/null +++ b/SIGNATURE @@ -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----- diff --git a/THANKS b/THANKS new file mode 100644 index 0000000..6044a4f --- /dev/null +++ b/THANKS @@ -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 for pointing +out redirection loops problem when cookies are not activated. +(2005-11-07) + + Thanks to nsnake for reporting warnings +from HTML::Parser version >= 3.40 when checking UTF-8 pages. +(2007-06-06) diff --git a/THANKS.zh-cn b/THANKS.zh-cn new file mode 100644 index 0000000..5491e0a --- /dev/null +++ b/THANKS.zh-cn @@ -0,0 +1,11 @@ +  感谢 SourceForge 提供架设 reslog 专案。 + +  感谢 CPAN 提供架设 reslog 专案。 + +  感谢 SourceForge 提供 compile farm 各种平台供专案测试。 + +  感谢 Stefan Seifert 回报不支援 Cookies +时网页无限自我转向的问题。 (2005-11-07) + +  感谢 nsnake 回报检查 UTF-8 页面时, +HTML::Parser 3.40 版以上会出现警告讯息的问题。 (2007-06-06) diff --git a/THANKS.zh-tw b/THANKS.zh-tw new file mode 100644 index 0000000..cf51d20 --- /dev/null +++ b/THANKS.zh-tw @@ -0,0 +1,11 @@ +稰谅 SourceForge 矗ㄑ琜砞 reslog 盡 + +稰谅 CPAN 矗ㄑ琜砞 reslog 盡 + +稰谅 SourceForge 矗ㄑ compile farm 贺キㄑ盡代刚 + +稰谅 Stefan Seifert 厨ぃや穿 Cookies +呼礚и锣拜肈 (2005-11-07) + +稰谅 nsnake 厨浪琩 UTF-8  +HTML::Parser 3.40 穦瞷牡癟拜肈 (2007-06-06) diff --git a/TODO b/TODO new file mode 100644 index 0000000..9db5336 --- /dev/null +++ b/TODO @@ -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. diff --git a/TODO.zh-cn b/TODO.zh-cn new file mode 100644 index 0000000..6ba9151 --- /dev/null +++ b/TODO.zh-cn @@ -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 的问题。 diff --git a/TODO.zh-tw b/TODO.zh-tw new file mode 100644 index 0000000..9200f6d --- /dev/null +++ b/TODO.zh-tw @@ -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 拜肈 diff --git a/chklinks b/chklinks new file mode 100755 index 0000000..75849c8 --- /dev/null +++ b/chklinks @@ -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 . + +# 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 "; +$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 is a non-threaded Perl link checker. It helps finding +broken links on your website. + +F differs from C in that F 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 follows F rules. If you disallow robots +from your website and experience problems, you need to allow +F. Add the following lines to your F file to +allow F: + + User-agent: chklinks + Disallow: + +F uses L 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. This is the requirement of +L.) + +F 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 does not obey C in F yet. +This is a problem in L, but +not F 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 issue when working +with L version >= 3.40. +See CPAN RT Bug#20274 http://rt.cpan.org/Public/Bug/Display.html?id=20274 +for a L patch on this. + +=head1 BUGS + +F 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, including hidden intruders. Also what you type +in your shell will be saved to your shell history file. + +C URLs should be supported by checking the validity of its +DNS/MX record. Bastian Kleineidam's L +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 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 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 +for a list of available commands. + +=head1 SEE ALSO + +L, +L, L, +L, L, +Bastian Kleineidam's L, +W3C-LinkChecker L. + +=head1 AUTHOR + +imacat . + +=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 even the implied warranty of +I or I. 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. + +=cut diff --git a/chklinks.en.html b/chklinks.en.html new file mode 100644 index 0000000..877a4ae --- /dev/null +++ b/chklinks.en.html @@ -0,0 +1,477 @@ + + + + + + + + + + + + + + + +chklinks Version 3.09 + + + +

+ 正體中文 | + 简体中文 | + English +
+
+ + +
+ + +

chklinks Version 3.09

+ + +

What’s New?

+ + +
+ +
2007-12-06
+ +
+

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

+
+ + +
2007-12-05
+ +
+

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

+
+ + +
2007-12-05
+ +
+

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

+
+ + +
2007-06-08
+ +
+

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

+
+ + +
2007-06-07
+ +
+

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

+
+ + +
2007-06-06
+ +
+

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

+
+ + +
2007-06-06
+ +
+

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

+
+ + +
2006-06-02
+ +
+

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

+
+ + +
2006-05-31
+ +
+

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

+
+ + +
2006-05-30
+ +
+

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

+
+ + +
2005-10-02
+ +
+

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

+
+ + +
2005-04-27
+ +
+

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

+
+ + +
2003-05-26
+ +
+

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

+
+ + +
2003-05-25
+ +
+

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

+
+ + +
2003-05-25
+ +
+

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

+
+ + +
2003-05-19
+ +
+

SourceForge project space approved.

+
+ + +
2003-05-18
+ +
+

Requesting a SourceForge project space.

+
+ +
+ + +

Description

+ +

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

+ +

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

+ +

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

+ +
+User-agent: chklinks
+Disallow:
+
+ +

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

+ +

chklinks supports cookies.

+ + +

System Requirement

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

  2. + +
  3. Required Perl modules:

    + +
    +
    URI
    + +
    +

    This is used to parse and process the found URLs. You can download and install URI from the CPAN archive, 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, 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, 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 CPAN shell, the above shall be automatically installed.

    +
  4. + + +
  5. Optional Perl modules:

    + +
    +
    Crypt::SSLeay
    + +
    +

    This is needed for LWP::RobotUA to support HTTPS. You can download and install Config::General from the CPAN archive, or install it with the CPAN shell by running cpan Config::General, or install it with the CPANPLUS shell by running cpanp i Config::General. Debian/Ubandu Linux users can install it by running apt-get install libconfig-general-perl. Red Hat/Fedora/CentOS Linux users can install it by running yum install perl-Config-General. FreeBSD users can install it by running ports install p5-Config-General. 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.

    +
    +
    +
  6. +
+ + +

Download

+ +

chklinks’s official websites is at…

+ + + +

You can always download the newest version of chklinks from…

+ + + +

imacat’s PGP public key is at…

+ + + + +

Install

+ +

Install with ExtUtils::MakeMaker

+ +

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

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

When running make install, make sure you have the priviledge to write to the 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.

+ +

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).

+ + +

Options

+ +
+./chklinks [options] URL1 [URL2 [URL3 …]]
+./chklinks [-h|-v]
+
+ + +
+
-1,--onelevel
+ +
+

Check the links on this page and stops.

+
+ + +
-r,--recursive
+ +
+

Recursively check through this website. This is the default.

+
+ + +
-b,--below
+ +
+

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

+
+ + +
-p,--parent
+ +
+

Trace back to the parent directories.

+
+ + +
-l,--local
+ +
+

Only check the links on this same host.

+
+ + +
-s,--span
+ +
+

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

+
+ + +
-e,--exclude path
+ +
+

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

+
+ + +
-i,--include path
+ +
+

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

+
+ + +
-d,--debug
+ +
+

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

+
+ + +
-q,--quiet
+ +
+

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

+
+ + +
-h, --help
+ +
+

Display the help message and exit.

+
+ + +
-v, --version
+ +
+

Output version information and exit.

+
+ + +
URL1, URL2, URL3
+ +
+

The URLs of the websites to check against.

+
+
+ + +

Notes

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

  • + +
  • If you encounter warnings like this:

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

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

    +
  • +
+ + +

See Also

+ +

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

+ + +

Copyright

+ +

Copyright © 2003-2007 imacat. All rights reserved.

+ +

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

+ +

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

+ +

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

+ + +

Release Notes

+ +

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

+ + +

Support

+ +

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

+ + + +

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

+ +
+ + +
+ + + + diff --git a/chklinks.zh-cn.html b/chklinks.zh-cn.html new file mode 100644 index 0000000..ac82ea4 --- /dev/null +++ b/chklinks.zh-cn.html @@ -0,0 +1,477 @@ + + + + + + + + + + + + + + + +chklinks 3.09 版 + + + +
+ 正體中文 | + 简体中文 | + English +
+
+ + +
+ + +

chklinks 3.09 版

+ + +

最新消息

+ +
+ +
2007-12-06
+ +
+

chklinks 最新版本 3.09 。新版修正像 MS-Windows 之类不支援 getpwuid() 呼叫的作业系统的问题。下载 chklinks 3.09 版

+
+ + +
2007-12-05
+ +
+

chklinks 最新版本 3.08 。新版修正好几个说明文件的问题。下载 chklinks 3.08 版

+
+ + +
2007-12-05
+ +
+

chklinks 最新版本 3.07 。所需 Perl 版本号码改用相容於旧版的号码格式,以消除 Perl 5.10 的警告讯息。版权更新为 GPLv3下载 chklinks 3.07 版

+
+ + +
2007-06-08
+ +
+

chklinks 最新版本 3.06 。测试程式修正。下载 chklinks 3.06 版

+
+ + +
2007-06-07
+ +
+

chklinks 最新版本 3.05 。修正 Perl 5.8 版以前无 UTF-8 模式的问题。下载 chklinks 3.05 版

+
+ + +
2007-06-06
+ +
+

chklinks 最新版本 3.04 。修正说明文件。下载 chklinks 3.04 版

+
+ + +
2007-06-06
+ +
+

chklinks 最新版本 3.03 。修正 HTML::Parser 的原始 UTF-8 警告讯息,加上支援以 Module::Build 安装。下载 chklinks 3.03 版

+
+ + +
2006-06-02
+ +
+

chklinks 最新版本 3.02 。更正错误的数位签章。下载 chklinks 3.02 版

+
+ + +
2006-05-31
+ +
+

chklinks 最新版本 3.01 。修正 Makefile.PL 漏掉的相依模组,并把漏掉的 HTML 文件加回来。下载 chklinks 3.01 版

+
+ + +
2006-05-30
+ +
+

chklinks 最新版本 3.00 。改用 HTML::LinkExtor 解读网页并用 LWP::RobotUA 连线取得网页。支援 http 外的其它网址格式。支援网站的 Cookies 。遵守 robots.txt 设定的规则。下载 chklinks 3.00 版

+
+ + +
2005-10-02
+ +
+

网站样式调整,加上无障碍网页的设计,以 CSS 边框代替 <hr /> ,以符合无障碍网页空间的要求。

+
+ + +
2005-04-27
+ +
+

网站上的繁体中文字样更正为正体中文

+
+ + +
2003-05-26
+ +
+

chklinks 最新版本 2.02 。预设由检查本页就好,改为检查整个网站。这样比较符合大多数的需求。下载 chklinks 2.02 版

+
+ + +
2003-05-25
+ +
+

chklinks 最新版本 2.01 。加上安装程式、附加档案与 POD 说明档。下载 chklinks 2.01 版

+
+ + +
2003-05-25
+ +
+

chklinks 最新版本 2.0.0 。首次公开上传到 SourceForge 。只有主程式。下载 chklinks 2.0.0 版

+
+ + +
2003-05-19
+ +
+

SourceForge 专案通过。

+
+ + +
2003-05-18
+ +
+

申请 SourceForge 专案。

+
+ +
+ + +

说明

+ +

chklinks 是单执行绪的 Perl 连结检查程式,用来检查网站上的超连结有没有疏漏。

+ +

chklinkslinkchecker 不同之处在於,chklinks 不是多执行绪的程式。 chklinks 检查时,不会同时启动一大堆连线同步检查,耗尽系统资源,导致当机。对大多数网管和使用者而言,这样做安全得多。

+ +

chklinks 遵守 robots.txt 设定的规则。若你的网站拒绝自动网页程式,导致 chklinks 无法执行,请在你的 robots.txt ,加入下列两行,放行 chklinks

+ +
+User-agent: chklinks
+Disallow:
+
+ +

chklinks 使用 LWP::RobotUA 连线,支援下列通讯协定: httphttpsftpgopherfilechklinks 也可以检查一般的档案。(若要使用 https 通讯协定,需先安装 Crypt::SSLeay 。这是 LWP::RobotUA 的需求。)

+ +

chklinks 支援网站的 Cookies

+ + +

系统需求

+ +
    +
  1. Perl 5.6 或以上。我还没有在更早的版本上成功执行过。若你可以在更早的版本上执行,请告诉我。你可以输入 perl -v 查询你目前的 Perl 版本。目前大多数的 Unix 系统都有 Perl 。如果你没有 Perl 或需要升级,可以到 Perl 网站下载安装最新版 Perl 。若你是用 MS-Windows ,可以下载安装 ActiveState 公司的 ActivePerl

  2. + +
  3. 需搭配的 Perl 模组:

    + +
    +
    URI
    + +
    +

    这是解析、处理网址用的。你可以CPAN 模组库下载安装 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::LinkExtorHTML-Parser 中的模组。你可以CPAN 模组库下载安装 HTML::LinkExtor ,或用 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::RobotUAlibwww-perl 中的模组。你可以CPAN 模组库下载安装 LWP::RobotUA ,或用 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 安装。

    +
    +
    + +

    若你由 CPANCPANPLUS Shell 安装 chklinks ,会自动帮你安装以上所需的模组。

    +
  4. + +
  5. 选配的 Perl 模组:

    + +
    +
    Crypt::SSLeay
    + +
    +

    这是要让 LWP::RobotUA 支援 HTTPS 的功能。你可以CPAN 模组库下载安装 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::SSLeayActivePerl PPM 套件安装。不过若你是 ActivePerl 使用者,还是可以改由其它套件库,执行 ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd 安装。

    +
    +
    +
  6. +
+ + +

下载

+ +

chklinks 的官方网站在:

+ + + +

最新版 chklinks 可由下列位址下载:

+ + + +

依玛猫的 PGP 公钥在:

+ + + + +

安装

+ +

ExtUtils::MakeMaker 安装

+ +

chklinksPerl 标准的 ExtUtils::MakeMaker 安装,程序如下:

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

make install 前,请先确认你有在安装目录存档的权限。通常这时候要切换为 root ,才能安装存档。

+ +

若你是用 MS-Windows 下的 ActivePerlmake 请改用 nmakenmake 可 +由微软的 FTP 站下载

+ +

若要安装到其它地方,请设定好 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 )。

+ + +

命令列参数

+ +
+./chklinks [参数] 网址1 [网址2 [网址3 …]]
+./chklinks [-h|-v]
+
+ + +
+
-1,--onelevel
+ +
+

检查本页就好,不继续查下去。

+
+ + +
-r,--recursive
+ +
+

检查完整个网站。预设是 --recursive

+
+ + +
-b,--below
+ +
+

只检查该目录下的连结。预设是 --below

+
+ + +
-p,--parent
+ +
+

上溯到全站的连结。

+
+ + +
-l,--local
+ +
+

只检查站上的连结,不检查站外连结。

+
+ + +
-s,--span
+ +
+

检查站外的连结(但不会查下去)。预设是 --span

+
+ + +
-e,--exclude 路径
+ +
+

排除该路迳。把该路径下的档案当成站外连结,只检查能不能连,不深入查下去。你可以指定很多个 --exclude

+
+ + +
-i,--include 路径
+ +
+

包含该路迳。和 --exclude 效果相反,用来抵销 --exclude 。排后面的优先处理。

+
+ + +
-d,--debug
+ +
+

显示详细的执行讯息。越多个 --debug ,讯息越详细。

+
+ + +
-q,--quiet
+ +
+

关闭执行讯息。和 --debug 效果相反,用来抵销 --debug

+
+ + +
-h, --help
+ +
+

显示程式说明。

+
+ + +
-v, --version
+ +
+

显示程式版本。

+
+ +
网址1, 网址2, 网址3
+ +
+

要检查的网站网址。

+
+
+ + +

注意事项

+ +
    +
  • chklinks 尚未遵守 robots.txtCrawl-delay: 规则。不过这是 WWW::RobotRules 的问题,不是 chklinks 的问题。

  • + +
  • 若出现以下警告:

    + +
    +
    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 报告,取得 LWP::Protocol 的修补程式。

    +
  • +
+ + +

参考资料

+ +

LWP::UserAgentLWP::RobotUAWWW::RobotRulesURIHTML::LinkExtorBastian KleineidamlinkcheckerW3C-LinkChecker checklink

+ + +

版权声明

+ +

版权所有 © 2003-2007 依玛猫。

+ +

本程式是自由软体,您可以遵照自由软体基金会 (Free Software Foundation) 出版的 GNU 通用公共许可证条款 (GNU General Public License) 第三版来修改和重新发布这一程式,或者自由选择使用任何更新的版本。

+ +

发布这一程式的目的是希望它有用,但没有任何担保。甚至没有适合特定目的而隐含的担保。更详细的情况请参阅 GNU 通用公共许可证

+ +

您应该已经和程式一起收到一份 GNU 通用公共许可证的副本。如果还没有,参阅<http://www.gnu.org/licenses/>

+ + +

版本纪录

+ +

请阅读 NEWS 档,查看程式的演变、新增的功能和修补的错误。

+ + +

支援协助

+ +

chklinks 网站架在 SourceForgeCPAN旅舍依玛。索取最新资讯,请驾临:

+ + + +

SourceForge 上有一个 chklinks 的邮件通讯 。使用上的问题、建议或错误回报,请提到通讯上讨论。它是 Mailman 的邮件通讯。若要加入,请到 chklinks 邮件通讯的网页 。你也可以写信到 E-mail 指令信箱,标题填上 help ,索取 E-mail 指令说明。

+ +
+ + +
+ + + + diff --git a/chklinks.zh-tw.html b/chklinks.zh-tw.html new file mode 100644 index 0000000..0c24ade --- /dev/null +++ b/chklinks.zh-tw.html @@ -0,0 +1,480 @@ + + + + + + + + + + + + + + + +chklinks 3.09  + + + +
+ 羉砰いゅ | + 简蔨いゅ | + English +
+
+ + +
+ + +

chklinks 3.09 

+ + +

程穝

+ +
+ +
2007-12-06
+ +
+

chklinks 程穝セ 3.09 穝タ钩 MS-Windows ぇ摸ぃや穿 getpwuid() ㊣穨╰参拜肈更 chklinks 3.09 

+
+ + +
2007-12-05
+ +
+

chklinks 程穝セ 3.08 穝タ碭弧ゅン拜肈更 chklinks 3.08 

+
+ + +
2007-12-05
+ +
+

chklinks 程穝セ 3.07 ┮惠 Perl セ腹絏эノ甧侣腹絏Α埃 Perl 5.10 牡癟舦穝 GPLv3更 chklinks 3.07 

+
+ + +
2007-06-08
+ +
+

chklinks 程穝セ 3.06 代刚祘Αタ更 chklinks 3.06 

+
+ + +
2007-06-07
+ +
+

chklinks 程穝セ 3.05 タ Perl 5.8 玡礚 UTF-8 家Α拜肈更 chklinks 3.05 

+
+ + +
2007-06-06
+ +
+

chklinks 程穝セ 3.04 タ弧ゅン更 chklinks 3.04 

+
+ + +
2007-06-06
+ +
+

chklinks 程穝セ 3.03 タ HTML::Parser ﹍ UTF-8 牡癟や穿 Module::Build 杆更 chklinks 3.03 

+
+ + +
2006-06-02
+ +
+

chklinks 程穝セ 3.02 タ岿粇计帽彻更 chklinks 3.02 

+
+ + +
2006-05-31
+ +
+

chklinks 程穝セ 3.01 タ Makefile.PL 簗奔ㄌ家舱р簗奔 HTML ゅンㄓ更 chklinks 3.01 

+
+ + +
2006-05-30
+ +
+

chklinks 程穝セ 3.00 эノ HTML::LinkExtor 秆弄呼ノ LWP::RobotUA 硈絬眔呼や穿 http ㄤウ呼Αや穿呼 Cookies 宽 robots.txt 砞﹚砏玥更 chklinks 3.00 

+
+ + +
2005-10-02
+ +
+

呼妓Α秸俱礚毁锚呼砞璸 CSS 娩蠢 <hr /> 才礚毁锚呼丁璶―

+
+ + +
2005-04-27
+ +
+

呼羉砰いゅ妓タタ砰いゅ

+
+ + +
2003-05-26
+ +
+

chklinks 程穝セ 2.02 箇砞パ浪琩セ碞э浪琩俱呼硂妓ゑ耕才计惠―更 chklinks 2.02 

+
+ + +
2003-05-25
+ +
+

chklinks 程穝セ 2.01 杆祘Α郎籔 POD 弧郎更 chklinks 2.01 

+
+ + +
2003-05-25
+ +
+

chklinks 程穝セ 2.0.0 Ωそ秨肚 SourceForge Τ祘Α更 chklinks 2.0.0 

+
+ + +
2003-05-19
+ +
+

SourceForge 盡硄筁

+
+ + +
2003-05-18
+ +
+

ビ叫 SourceForge 盡

+
+ +
+ + +

弧

+ +

chklinks 琌虫磅︽狐 Perl 硈挡浪琩祘Αノㄓ浪琩呼禬硈挡Τ⊿Τ波簗

+ +

chklinkslinkchecker ぃぇ矪chklinks ぃ琌磅︽狐祘Α chklinks 浪琩ぃ穦币笆帮硈絬˙浪琩荷╰参戈方旧璓讽诀癸计呼恨㎝ㄏノτē硂妓暗眔

+ +

chklinks 宽 robots.txt 砞﹚砏玥璝﹑呼┶荡笆呼祘Α旧璓 chklinks 礚猭磅︽叫﹑ robots.txt ㄢ︽︽ chklinks

+ +
+User-agent: chklinks
+Disallow:
+
+ +

chklinks ㄏノ LWP::RobotUA 硈絬や穿硄癟﹚ httphttpsftpgopherfilechklinks 浪琩郎璝璶ㄏノ https 硄癟﹚惠杆 Crypt::SSLeay 硂琌 LWP::RobotUA 惠―

+ +

chklinks や穿呼 Cookies

+ + +

╰参惠―

+ +
    +
  1. Perl 5.6 ┪и临⊿ΤΝセΘ磅︽筁璝﹑Νセ磅︽叫禗и﹑块 perl -v 琩高﹑ヘ玡 Perl セヘ玡计 Unix ╰参常Τ Perl 狦﹑⊿Τ Perl ┪惠璶狜 Perl 呼更杆程穝 Perl 璝﹑琌ノ MS-Windows 更杆 ActiveState そ ActivePerl

  2. + +
  3. 惠穎皌 Perl 家舱

    + +
    +
    URI
    + +
    +

    硂琌秆猂矪瞶呼ノ﹑CPAN 家舱畐更杆 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::LinkExtorHTML-Parser い家舱﹑CPAN 家舱畐更杆 HTML::LinkExtor ┪ノ 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::RobotUAlibwww-perl い家舱﹑CPAN 家舱畐更杆 LWP::RobotUA ┪ノ 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 杆

    +
    +
    + +

    璝﹑パ CPANCPANPLUS Shell 杆 chklinks 穦笆腊﹑杆┮惠家舱

    +
  4. + +
  5. 匡皌 Perl 家舱

    + +
    +
    Crypt::SSLeay
    + +
    +

    硂琌璶琵 LWP::RobotUA や穿 HTTPS ﹑CPAN 家舱畐更杆 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::SSLeayActivePerl PPM 甅ン杆ぃ筁璝﹑琌 ActivePerl ㄏノ临琌эパㄤウ甅ン畐磅︽ ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd 杆

    +
    +
    +
  6. +
+ + +

更

+ +

chklinks ﹛よ呼

+ + + +

程穝 chklinks パ更

+ + + +

ㄌ嚎窟 PGP そ芲

+ + + + +

杆

+ +

ExtUtils::MakeMaker 杆

+ +

chklinksPerl 夹非 ExtUtils::MakeMaker 杆祘

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

make install 玡叫絋粄﹑Τ杆ヘ魁郎舦硄盽硂璶ち传 root 杆郎

+ +

璝﹑琌ノ MS-Windows  ActivePerlmake 叫эノ nmakenmake  +パ稬硁 FTP 更

+ +

璝璶杆ㄤウよ叫砞﹚ 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 

+ + +

㏑把计

+ +
+./chklinks [把计] 呼1 [呼2 [呼3 …]]
+./chklinks [-h|-v]
+
+ + +
+
-1,--onelevel
+ +
+

浪琩セ碞ぃ膥尿琩

+
+ + +
-r,--recursive
+ +
+

浪琩Ч俱呼箇砞琌 --recursive

+
+ + +
-b,--below
+ +
+

浪琩赣ヘ魁硈挡箇砞琌 --below

+
+ + +
-p,--parent
+ +
+

饭硈挡

+
+ + +
-l,--local
+ +
+

浪琩硈挡ぃ浪琩硈挡

+
+ + +
-s,--span
+ +
+

浪琩硈挡ぃ穦琩箇砞琌 --span

+
+ + +
-e,--exclude 隔畖
+ +
+

逼埃赣隔硍р赣隔畖郎讽Θ硈挡浪琩ぃ硈ぃ瞏琩﹑﹚ --exclude

+
+ + +
-i,--include 隔畖
+ +
+

赣隔硍㎝ --exclude 狦はノㄓ╄綪 --exclude 逼纔矪瞶

+
+ + +
-d,--debug
+ +
+

陪ボ冈灿磅︽癟禫 --debug 癟禫冈灿

+
+ + +
-q,--quiet
+ +
+

闽超磅︽癟㎝ --debug 狦はノㄓ╄綪 --debug

+
+ + +
-h, --help
+ +
+

陪ボ祘Α弧

+
+ + +
-v, --version
+ +
+

陪ボ祘Αセ

+
+ +
呼1, 呼2, 呼3
+ +
+

璶浪琩呼呼

+
+
+ + +

猔種ㄆ兜

+ +
    +
  • chklinks ﹟ゼ宽 robots.txtCrawl-delay: 砏玥ぃ筁硂琌 WWW::RobotRules 拜肈ぃ琌 chklinks 拜肈

  • + +
  • 璝瞷牡

    + +
    +
    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 厨眔 LWP::Protocol 干祘Α

    +
  • +
+ + +

把σ戈

+ +

LWP::UserAgentLWP::RobotUAWWW::RobotRulesURIHTML::LinkExtorBastian KleineidamlinkcheckerW3C-LinkChecker checklink

+ + +

舦羘

+ +

舦┮Τ © 2003-2007 ㄌ嚎窟

+ +

セ祘Α琌パ硁砰眤宽酚パ硁砰膀穦 (Free Software Foundation)  GNU 硄ノそ砛靡兵蹿 (GNU General Public License) 材ㄓэ㎝穝祇硂祘Α┪パ匡拒ㄏノヴ穝セ

+ +

祇硂祘Αヘ琌辨ウΤノ⊿Τヴ踞玂⊿Τ続疭﹚ヘτ留踞玂冈灿薄猵叫把綷 GNU 硄ノそ砛靡

+ +

眤莱赣竒㎝祘Α癬Μ GNU 硄ノそ砛靡捌セ狦临⊿Τ把綷<http://www.gnu.org/licenses/>

+ + +

セ魁

+ +

叫綷弄 NEWS 郎琩祘Α簍跑穝糤㎝干岿粇

+ + +

や穿

+ +

chklinks 呼琜 SourceForgeCPANㄌ嚎程穝戈癟叫緍羬

+ + + +

SourceForge Τ chklinks 秎ン硄癟 ㄏノ拜肈某┪岿粇厨叫矗硄癟癚阶ウ琌 Mailman 秎ン硄癟璝璶叫 chklinks 秎ン硄癟呼 ﹑糶獺 E-mail 獺絚夹肈恶 help  E-mail 弧

+ +
+ + +
+ + + + diff --git a/fdl.txt b/fdl.txt new file mode 100644 index 0000000..4a0fe1c --- /dev/null +++ b/fdl.txt @@ -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. diff --git a/pgpkey.asc b/pgpkey.asc new file mode 100644 index 0000000..bd75349 --- /dev/null +++ b/pgpkey.asc @@ -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----- diff --git a/t/00-signature.t b/t/00-signature.t new file mode 100755 index 0000000..1cf917c --- /dev/null +++ b/t/00-signature.t @@ -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__ diff --git a/t/01-basic.t b/t/01-basic.t new file mode 100755 index 0000000..c2a8403 --- /dev/null +++ b/t/01-basic.t @@ -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 . + +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($_, ""); diff --git a/t/99-pod.t b/t/99-pod.t new file mode 100755 index 0000000..9622b2f --- /dev/null +++ b/t/99-pod.t @@ -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(); diff --git a/t/htdocs/dir01/start.html b/t/htdocs/dir01/start.html new file mode 100644 index 0000000..06ebba4 --- /dev/null +++ b/t/htdocs/dir01/start.html @@ -0,0 +1,24 @@ + + + + + + +Test Start + + + +

Test Start

+ +

閫欐槸涓闋佹脯瑭︾恫闋併

+ + + + + diff --git a/t/htdocs/dir01/test01.html b/t/htdocs/dir01/test01.html new file mode 100644 index 0000000..471030d --- /dev/null +++ b/t/htdocs/dir01/test01.html @@ -0,0 +1,24 @@ + + + + + + +Test #01 + + + +

Test #01

+ + + + + diff --git a/t/htdocs/stylesheets/test.css b/t/htdocs/stylesheets/test.css new file mode 100644 index 0000000..7bb1879 --- /dev/null +++ b/t/htdocs/stylesheets/test.css @@ -0,0 +1,3 @@ +p { + text-indent: 0.5in; +} diff --git a/t/htdocs/test03.html b/t/htdocs/test03.html new file mode 100644 index 0000000..b8fbe6c --- /dev/null +++ b/t/htdocs/test03.html @@ -0,0 +1,14 @@ + + + + + +Test #03 + + + +

Test #03

+ + +