Pod-MinimumVersion-50/0002755000175000017500000000000011545420711012557 5ustar ggggPod-MinimumVersion-50/xt/0002755000175000017500000000000011545420710013211 5ustar ggggPod-MinimumVersion-50/xt/0-Test-ConsistentVersion.t0000644000175000017500000000227111541504107020146 0ustar gggg#!/usr/bin/perl -w # 0-Test-ConsistentVersion.t -- run Test::ConsistentVersion if available # Copyright 2011 Kevin Ryde # 0-Test-ConsistentVersion.t is shared by several distributions. # # 0-Test-ConsistentVersion.t 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, or (at your option) any # later version. # # 0-Test-ConsistentVersion.t 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 file. If not, see . use 5.006; use strict; use warnings; use Test::More; eval { require Test::ConsistentVersion } or plan skip_all => "due to Test::ConsistentVersion not available -- $@"; Test::ConsistentVersion::check_consistent_versions (no_readme => 1, # no version number in my READMEs no_pod => 1, # no version number in my docs, at the moment ); # ! -e 'README'); exit 0; Pod-MinimumVersion-50/xt/0-Test-Pod.t0000755000175000017500000000176711523640137015211 0ustar gggg#!/usr/bin/perl -w # 0-Test-Pod.t -- run Test::Pod if available # Copyright 2009, 2010, 2011 Kevin Ryde # 0-Test-Pod.t is shared by several distributions. # # 0-Test-Pod.t 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, or (at your option) any later # version. # # 0-Test-Pod.t 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 file. If not, see . use 5.006; use strict; use warnings; use Test::More; # all_pod_files_ok() is new in Test::Pod 1.00 # eval 'use Test::Pod 1.00; 1' or plan skip_all => "due to Test::Pod 1.00 not available -- $@"; Test::Pod::all_pod_files_ok(); exit 0; Pod-MinimumVersion-50/xt/0-Test-YAML-Meta.t0000755000175000017500000000234711523640136016107 0ustar gggg#!/usr/bin/perl -w # 0-Test-YAML-Meta.t -- run Test::YAML::Meta if available # Copyright 2009, 2010, 2011 Kevin Ryde # 0-Test-YAML-Meta.t is shared by several distributions. # # 0-Test-YAML-Meta.t 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, or (at your option) any later # version. # # 0-Test-YAML-Meta.t 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 file. If not, see . use 5.006; use strict; use warnings; use Test::More; my $meta_filename = 'META.yml'; unless (-e $meta_filename) { plan skip_all => "$meta_filename doesn't exist -- assume this is a working directory not a dist"; } # Test::YAML::Meta version 0.15 for upper case "optional_features" names # eval 'use Test::YAML::Meta 0.15; 1' or plan skip_all => "due to Test::YAML::Meta 0.15 not available -- $@"; Test::YAML::Meta::meta_yaml_ok(); exit 0; Pod-MinimumVersion-50/xt/0-Test-Synopsis.t0000755000175000017500000000200211523640137016275 0ustar gggg#!/usr/bin/perl -w # 0-Test-Synopsis.t -- run Test::Synopsis if available # Copyright 2009, 2010, 2011 Kevin Ryde # 0-Test-Synopsis.t is shared by several distributions. # # 0-Test-Synopsis.t 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, or (at your option) any later # version. # # 0-Test-Synopsis.t 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 file. If not, see . use 5.006; use strict; use warnings; use Test::More; eval 'use Test::Synopsis; 1' or plan skip_all => "due to Test::Synopsis not available -- $@"; ## no critic (ProhibitCallsToUndeclaredSubs) all_synopsis_ok(); exit 0; Pod-MinimumVersion-50/xt/0-Test-DistManifest.t0000755000175000017500000000232711523640140017044 0ustar gggg#!/usr/bin/perl -w # 0-Test-DistManifest.t -- run Test::DistManifest if available # Copyright 2009, 2010, 2011 Kevin Ryde # 0-Test-DistManifest.t is shared by several distributions. # # 0-Test-DistManifest.t 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, or (at your option) any # later version. # # 0-Test-DistManifest.t 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 file. If not, see . use 5.006; use strict; use warnings; use Test::More; # This is only an author test really and it only really does much in a # working directory where newly added files will exist. In a dist dir # something would have to be badly wrong for the manifest to be off. eval { require Test::DistManifest } or plan skip_all => "due to Test::DistManifest not available -- $@"; Test::DistManifest::manifest_ok(); exit 0; Pod-MinimumVersion-50/xt/0-META-read.t0000755000175000017500000001071611523640141015176 0ustar gggg#!/usr/bin/perl -w # 0-META-read.t -- check META.yml can be read by various YAML modules # Copyright 2009, 2010, 2011 Kevin Ryde # 0-META-read.t is shared among several distributions. # # 0-META-read.t 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, or (at your option) any later # version. # # 0-META-read.t 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 file. If not, see . use 5.006; use strict; use warnings; use Test::More; use lib 't'; use MyTestHelpers; BEGIN { MyTestHelpers::nowarnings() } # When some of META.yml is generated by explicit text in Makefile.PL it can # be easy to make a mistake in the syntax, or indentation, etc, so the idea # here is to check it's readable from some of the YAML readers. # # The various readers differ in how strictly they look at the syntax. # There's no attempt here to say one of them is best or tightest or # whatever, just see that they all work. # # See 0-Test-YAML-Meta.t for Test::YAML::Meta which looks into field # contents, as well as maybe the YAML formatting. my $meta_filename; # allow for ancient perl, maybe eval { require FindBin; 1 } # new in 5.004 or plan skip_all => "FindBin not available -- $@"; eval { require File::Spec; 1 } # new in 5.005 or plan skip_all => "File::Spec not available -- $@"; diag "FindBin $FindBin::Bin"; $meta_filename = File::Spec->catfile ($FindBin::Bin, File::Spec->updir, 'META.yml'); -e $meta_filename or plan skip_all => "$meta_filename doesn't exist -- assume this is a working directory not a dist"; plan tests => 5; SKIP: { eval { require YAML; 1 } or skip "due to YAML module not available -- $@", 1; my $ok = eval { YAML::LoadFile ($meta_filename); 1 } or diag "YAML::LoadFile() error -- $@"; ok ($ok, "Read $meta_filename with YAML module"); } # YAML 0.68 is in fact YAML::Old, or something weird -- don't think they can # load together # # SKIP: { # eval { require YAML::Old; 1 } # or skip 'due to YAML::Old not available -- $@', 1; # # eval { YAML::Old::LoadFile ($meta_filename) }; # is ($@, '', # "Read $meta_filename with YAML::Old"); # } SKIP: { eval { require YAML::Syck; 1 } or skip "due to YAML::Syck not available -- $@", 1; my $ok = eval { YAML::Syck::LoadFile ($meta_filename); 1 } or diag "YAML::Syck::LoadFile() error -- $@"; ok ($ok, "Read $meta_filename with YAML::Syck"); } SKIP: { eval { require YAML::Tiny; 1 } or skip "due to YAML::Tiny not available -- $@", 1; my $ok = eval { YAML::Tiny->read ($meta_filename); 1 } or diag "YAML::Tiny->read() error -- $@"; ok ($ok, "Read $meta_filename with YAML::Tiny"); } SKIP: { eval { require YAML::XS; 1 } or skip "due to YAML::XS not available -- $@", 1; my $ok = eval { YAML::XS::LoadFile ($meta_filename); 1 } or diag "YAML::XS::LoadFile() error -- $@"; ok ($ok, "Read $meta_filename with YAML::XS"); } # Parse::CPAN::Meta describes itself for use on "typical" META.yml, so not # sure if demanding it works will more exercise its subset of yaml than the # correctness of our META.yml. At any rate might like to know if it fails, # so as to avoid tricky yaml for everyone's benefit, maybe. # SKIP: { eval { require Parse::CPAN::Meta; 1 } or skip "due to Parse::CPAN::Meta not available -- $@", 1; my $ok = eval { Parse::CPAN::Meta::LoadFile ($meta_filename); 1 } or diag "Parse::CPAN::Meta::LoadFile() error -- $@"; ok ($ok, "Read $meta_filename with Parse::CPAN::Meta::LoadFile"); } # Data::YAML::Reader 0.06 doesn't like header "--- #YAML:1.0" with the # # part produced by other YAML writers, so skip for now # # SKIP: { # eval { require Data::YAML::Reader; 1 } # or skip 'due to Data::YAML::Reader not available -- $@', 1; # # my $reader = Data::YAML::Reader->new; # open my $fh, '<', $meta_filename # or die "Cannot open $meta_filename"; # my $str = do { local $/=undef; <$fh> }; # close $fh or die; # # # if ($str !~ /\.\.\.$/) { # # $str .= "..."; # # } # my @lines = split /\n/, $str; # push @lines, "..."; # use Data::Dumper; # print Dumper(\@lines); # # # { local $,="\n"; print @lines,"\n"; } exit 0; Pod-MinimumVersion-50/debian/0002755000175000017500000000000011545420710014000 5ustar ggggPod-MinimumVersion-50/debian/copyright0000644000175000017500000000052411535004647015740 0ustar ggggPod-MinimumVersion is Copyright 2010, 2011 Kevin Ryde Pod-MinimumVersion is licensed under the GNU Public License GPL version 3 (or at your option any later version). The complete text of GPL version 3 is in the file /usr/share/common-licenses/GPL-3 Program home page: http://user42.tuxfamily.org/pod-minimumversion/index.html Pod-MinimumVersion-50/debian/rules0000755000175000017500000000147011535001635015060 0ustar gggg#!/usr/bin/make -f # Copyright 2011 Kevin Ryde # This file is part of Pod-MinimumVersion. # # Pod-MinimumVersion 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, or (at your option) any later # version. # # Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/perlmodule.mk Pod-MinimumVersion-50/debian/compat0000644000175000017500000000000111534777776015224 0ustar gggg5Pod-MinimumVersion-50/debian/control0000644000175000017500000000362711537260743015422 0ustar gggg# Copyright 2010, 2011 Kevin Ryde # # This file is part of Pod-MinimumVersion. # # Pod-MinimumVersion 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, or (at # your option) any later version. # # Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . # /usr/share/perl5/Pod/MinimumVersion.pm was previously in # libperl-critic-pulp-perl version 48, so "Breaks:" that. # # Suggest: libperl-critic-pulp-perl as it has # Perl::Critic::Policy::Compatibility::PodMinimumVersion using this. Source: pod-minimumversion Section: perl Priority: optional Build-Depends: libtest-perl | perl (>= 5.004.05), cdbs, debhelper (>= 5) Maintainer: Kevin Ryde Standards-Version: 3.9.1 Homepage: http://user42.tuxfamily.org/pod-minimumversion/index.html Bugs: mailto:user42@zip.com.au Package: pod-minimumversion Architecture: all Depends: perl (>= 5.004), libio-string-perl, libpod-parser-perl | perl (>= 5.6.0), libscalar-list-utils-perl | perl (>= 5.8), ${perl:Depends}, ${misc:Depends} Replaces: libperl-critic-pulp-perl (<= 48) Breaks: libperl-critic-pulp-perl (<= 48) Suggests: libperl-critic-pulp-perl (>= 49) Description: Determine minimum Perl version of POD directives Read a Perl source or pod file and report the minimum Perl version needed to process the POD directives used. . If targetting a particular Perl version this can report on POD directives that might only be recognised by later Perl. There's a command line program interface and a module. Pod-MinimumVersion-50/debian/changelog0000644000175000017500000000021411545417743015661 0ustar ggggpod-minimumversion (50-1) unstable; urgency=low * Packaged version. -- Kevin Ryde Sat, 02 Apr 2011 05:56:32 +1100 Pod-MinimumVersion-50/debian/source/0002755000175000017500000000000011545420710015300 5ustar ggggPod-MinimumVersion-50/debian/source/format0000644000175000017500000000000411534777776016534 0ustar gggg1.0 Pod-MinimumVersion-50/debian/watch0000644000175000017500000000174411535004630015033 0ustar gggg# Web site version watch, for devscripts uscan program. # Copyright 2011 Kevin Ryde # # This file is part of Pod-MinimumVersion. # # Pod-MinimumVersion 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, or (at your option) # any later version. # # Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . # Crib notes: # "man uscan" describes the format. # test with: uscan --report --verbose --watchfile=debian/watch version=3 http://user42.tuxfamily.org/pod-minimumversion/index.html \ .*/Pod-MinimumVersion-([0-9]+)\.tar\.gz Pod-MinimumVersion-50/COPYING0000644000175000017500000010437410641206144013617 0ustar gggg 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 . Pod-MinimumVersion-50/Changes0000644000175000017500000000204111545254665014062 0ustar ggggCopyright 2010, 2011 Kevin Ryde This file is part of Pod-MinimumVersion. Pod-MinimumVersion 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, or (at your option) any later version. Pod-MinimumVersion 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 can get a copy of the GNU General Public License online at . Version 50, April 2011 - fix detection of C<< in =item etc text parts Version 49, March 2011 - separate dist from Perl-Critic-Pulp - document 5.12 L Version 48, March 2011 - new 5.12 L Version 33, April 2010 - quietly ignore POD parse errors Version 23, November 2009 - PodMinimumVersion 5.004 for =for, =begin, =end Version 19, June 2009 - the first version Pod-MinimumVersion-50/t/0002755000175000017500000000000011545420710013021 5ustar ggggPod-MinimumVersion-50/t/MyTestHelpers.pm0000644000175000017500000002320411535004416016126 0ustar gggg# MyTestHelpers.pm -- my shared test script helpers # Copyright 2008, 2009, 2010, 2011 Kevin Ryde # MyTestHelpers.pm is shared by several distributions. # # MyTestHelpers.pm 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, or (at your option) any later # version. # # MyTestHelpers.pm 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 file. If not, see . package MyTestHelpers; use strict; use Exporter; use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS); # uncomment this to run the ### lines #use Smart::Comments; @ISA = ('Exporter'); @EXPORT_OK = qw(findrefs main_iterations warn_suppress_gtk_icon glib_gtk_versions any_signal_connections nowarnings); %EXPORT_TAGS = (all => \@EXPORT_OK); sub DEBUG { 0 } #----------------------------------------------------------------------------- { my $warning_count; my $stacktraces; my $stacktraces_count = 0; sub nowarnings_handler { $warning_count++; if ($stacktraces_count < 3 && eval { require Devel::StackTrace }) { $stacktraces_count++; $stacktraces .= "\n" . Devel::StackTrace->new->as_string() . "\n"; } warn @_; } sub nowarnings { $SIG{'__WARN__'} = \&nowarnings_handler; } END { if ($warning_count) { MyTestHelpers::diag ("Saw $warning_count warning(s):"); if (defined $stacktraces) { MyTestHelpers::diag ($stacktraces); } else { MyTestHelpers::diag('(Devel::StackTrace not available for backtrace)'); } MyTestHelpers::diag ('Exit code 1 for warnings'); $? = 1; } } } sub diag { if (Test::More->can('diag')) { Test::More::diag (@_); } else { my $msg = join('', map {defined($_)?$_:'[undef]'} @_)."\n"; $msg =~ s/^/# /mg; print STDERR $msg; } } sub dump { my ($thing) = @_; if (eval { require Data::Dumper; 1 }) { MyTestHelpers::diag (Data::Dumper::Dumper ($thing)); } else { MyTestHelpers::diag ("Data::Dumper not available"); } } #----------------------------------------------------------------------------- # Test::Weaken and other weaking sub findrefs { my ($obj) = @_; defined $obj or return; require Scalar::Util; if (ref $obj && Scalar::Util::reftype($obj) eq 'HASH') { MyTestHelpers::diag ("Keys: ", join(' ', map {"$_=$obj->{$_}"} keys %$obj)); } if (eval { require Devel::FindRef }) { MyTestHelpers::diag (Devel::FindRef::track($obj, 8)); } else { MyTestHelpers::diag ("Devel::FindRef not available -- ", $@); } } sub test_weaken_show_leaks { my ($leaks) = @_; $leaks || return; MyTestHelpers::diag ("Test-Weaken:"); MyTestHelpers::dump ($leaks); my $unfreed = $leaks->unfreed_proberefs; foreach my $proberef (@$unfreed) { MyTestHelpers::diag (" unfreed ", $proberef); } foreach my $proberef (@$unfreed) { MyTestHelpers::diag ("search ", $proberef); MyTestHelpers::findrefs($proberef); } } #----------------------------------------------------------------------------- # Gtk/Glib helpers # Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do() # if dbus is not running, or something like that. In any case limiting the # iterations is good for test safety. # sub main_iterations { my $count = 0; if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); } while (Gtk2->events_pending) { $count++; Gtk2->main_iteration_do (0); if ($count >= 500) { MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations"); return; } } MyTestHelpers::diag ("main_iterations(): ran $count events/iterations"); } # warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam # from Gtk trying to make you buy the hi-colour icon theme. Eg, # # { # local $SIG{'__WARN__'} = \&MyTestHelpers::warn_suppress_gtk_icon; # $something = SomeThing->new; # } # sub warn_suppress_gtk_icon { my ($message) = @_; unless ($message =~ /Gtk-WARNING.*icon/) { warn @_; } } sub glib_gtk_versions { my $gtk2_loaded = Gtk2->can('init'); my $glib_loaded = Glib->can('get_home_dir'); if ($gtk2_loaded) { MyTestHelpers::diag ("Perl-Gtk2 version ",Gtk2->VERSION); } if ($glib_loaded) { # when loaded MyTestHelpers::diag ("Perl-Glib version ",Glib->VERSION); MyTestHelpers::diag ("Compiled against Glib version ", Glib::MAJOR_VERSION(), ".", Glib::MINOR_VERSION(), ".", Glib::MICRO_VERSION(), "."); MyTestHelpers::diag ("Running on Glib version ", Glib::major_version(), ".", Glib::minor_version(), ".", Glib::micro_version(), "."); } if ($gtk2_loaded) { MyTestHelpers::diag ("Compiled against Gtk version ", Gtk2::MAJOR_VERSION(), ".", Gtk2::MINOR_VERSION(), ".", Gtk2::MICRO_VERSION(), "."); MyTestHelpers::diag ("Running on Gtk version ", Gtk2::major_version(), ".", Gtk2::minor_version(), ".", Gtk2::micro_version(), "."); } } # Return true if there's any signal handlers connected to $obj. # # Signal IDs are from 1 up, don't pass 0 to signal_handler_is_connected() # since in Glib 2.4.1 it spits out a g_log() error. # sub any_signal_connections { my ($obj) = @_; my @connected = grep {$obj->signal_handler_is_connected ($_)} (1 .. 500); if (@connected) { my $connected = join(',',@connected); MyTestHelpers::diag ("$obj signal handlers connected: $connected"); return $connected; } return undef; } # wait for $signame to be emitted on $widget, with a timeout sub wait_for_event { my ($widget, $signame) = @_; if (DEBUG) { MyTestHelpers::diag ("wait_for_event() $signame on ",$widget); } my $done = 0; my $got_event = 0; my $sig_id = $widget->signal_connect ($signame => sub { if (DEBUG) { MyTestHelpers::diag ("wait_for_event() $signame received"); } $done = 1; return 0; # Gtk2::EVENT_PROPAGATE (new in Gtk2 1.220) }); my $timer_id = Glib::Timeout->add (30_000, # 30 seconds sub { $done = 1; MyTestHelpers::diag ("wait_for_event() oops, timeout waiting for $signame on ",$widget); return 1; # Glib::SOURCE_CONTINUE (new in Glib 1.220) }); if ($widget->can('get_display')) { # GdkDisplay new in Gtk 2.2 $widget->get_display->sync; } else { # in Gtk 2.0 gdk_flush() is a sync actually Gtk2::Gdk->flush; } my $count = 0; while (! $done) { if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event() iteration $count"); } Gtk2->main_iteration; $count++; } MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n"); $widget->signal_handler_disconnect ($sig_id); Glib::Source->remove ($timer_id); } #----------------------------------------------------------------------------- # X11::Protocol helpers sub X11_chosen_screen_number { my ($X) = @_; foreach my $i (0 .. $#{$X->{'screens'}}) { if ($X->{'screens'}->[$i]->{'root'} == $X->{'root'}) { return $i; } } die "Oops, current screen not found"; } sub X11_server_info { my ($X) = @_; MyTestHelpers::diag(""); MyTestHelpers::diag("X server info"); MyTestHelpers::diag("vendor: ",$X->{'vendor'}); MyTestHelpers::diag("release_number: ",$X->{'release_number'}); MyTestHelpers::diag("protocol_major_version: ",$X->{'protocol_major_version'}); MyTestHelpers::diag("protocol_minor_version: ",$X->{'protocol_minor_version'}); MyTestHelpers::diag("byte_order: ",$X->{'byte_order'}); MyTestHelpers::diag("num screens: ",scalar(@{$X->{'screens'}})); MyTestHelpers::diag("width_in_pixels: ",$X->{'width_in_pixels'}); MyTestHelpers::diag("height_in_pixels: ",$X->{'height_in_pixels'}); MyTestHelpers::diag("width_in_millimeters: ",$X->{'width_in_millimeters'}); MyTestHelpers::diag("height_in_millimeters: ",$X->{'height_in_millimeters'}); MyTestHelpers::diag("root_visual: ",$X->{'root_visual'}); my $visual_info = $X->{'visuals'}->{$X->{'root_visual'}}; MyTestHelpers::diag(" depth: ",$visual_info->{'depth'}); MyTestHelpers::diag(" class: ",$visual_info->{'class'}, ' ', $X->interp('VisualClass', $visual_info->{'class'})); MyTestHelpers::diag(" colormap_entries: ",$visual_info->{'colormap_entries'}); MyTestHelpers::diag(" bits_per_rgb_value: ",$visual_info->{'bits_per_rgb_value'}); MyTestHelpers::diag(" red_mask: ",sprintf('%#X',$visual_info->{'red_mask'})); MyTestHelpers::diag(" green_mask: ",sprintf('%#X',$visual_info->{'green_mask'})); MyTestHelpers::diag(" blue_mask: ",sprintf('%#X',$visual_info->{'blue_mask'})); MyTestHelpers::diag("ima"."ge_byte_order: ",$X->{'ima'.'ge_byte_order'}, ' ', $X->interp('Significance', $X->{'ima'.'ge_byte_order'})); MyTestHelpers::diag("black_pixel: ",sprintf('%#X',$X->{'black_pixel'})); MyTestHelpers::diag("white_pixel: ",sprintf('%#X',$X->{'white_pixel'})); foreach (0 .. $#{$X->{'screens'}}) { if ($X->{'screens'}->[$_]->{'root'} == $X->{'root'}) { MyTestHelpers::diag("chosen screen: $_"); } } MyTestHelpers::diag(""); } 1; __END__ Pod-MinimumVersion-50/t/Report.t0000644000175000017500000000356111545254742014476 0ustar gggg#!/usr/bin/perl -w # Copyright 2008, 2009, 2010, 2011 Kevin Ryde # This file is part of Pod-MinimumVersion. # # Pod-MinimumVersion 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, or (at your option) any later # version. # # Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . use 5.004; use strict; use Test; BEGIN { plan tests => 7; } use lib 't'; use MyTestHelpers; BEGIN { MyTestHelpers::nowarnings() } require Pod::MinimumVersion::Report; #------------------------------------------------------------------------------ { my $want_version = 50; ok ($Pod::MinimumVersion::Report::VERSION, $want_version, 'VERSION variable'); ok (Pod::MinimumVersion::Report->VERSION, $want_version, 'VERSION class method'); { ok (eval { Pod::MinimumVersion::Report->VERSION($want_version); 1 }, 1, "VERSION class check $want_version"); my $check_version = $want_version + 1000; ok (! eval { Pod::MinimumVersion::Report->VERSION($check_version); 1 }, 1, "VERSION class check $check_version"); } { my $pmv = Pod::MinimumVersion::Report->new; ok ($pmv->VERSION, $want_version, 'VERSION object method'); ok (eval { $pmv->VERSION($want_version); 1 }, 1, "VERSION object check $want_version"); my $check_version = $want_version + 1000; ok (! eval { $pmv->VERSION($check_version); 1 }, 1, "VERSION object check $check_version"); } } exit 0; Pod-MinimumVersion-50/t/MinimumVersion.t0000755000175000017500000001627711545254763016222 0ustar gggg#!/usr/bin/perl -w # Copyright 2008, 2009, 2010, 2011 Kevin Ryde # This file is part of Pod-MinimumVersion. # # Pod-MinimumVersion 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, or (at your option) any later # version. # # Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . use 5.004; use strict; use Test; BEGIN { plan tests => 100; } use lib 't'; use MyTestHelpers; BEGIN { MyTestHelpers::nowarnings() } require Pod::MinimumVersion; #------------------------------------------------------------------------------ { my $want_version = 50; ok ($Pod::MinimumVersion::VERSION, $want_version, 'VERSION variable'); ok (Pod::MinimumVersion->VERSION, $want_version, 'VERSION class method'); { ok (eval { Pod::MinimumVersion->VERSION($want_version); 1 }, 1, "VERSION class check $want_version"); my $check_version = $want_version + 1000; ok (! eval { Pod::MinimumVersion->VERSION($check_version); 1 }, 1, "VERSION class check $check_version"); } { my $pmv = Pod::MinimumVersion->new; ok ($pmv->VERSION, $want_version, 'VERSION object method'); ok (eval { $pmv->VERSION($want_version); 1 }, 1, "VERSION object check $want_version"); my $check_version = $want_version + 1000; ok (! eval { $pmv->VERSION($check_version); 1 }, 1, "VERSION object check $check_version"); } } #------------------------------------------------------------------------------ foreach my $data ( # command with no final newline # provokes warnings from Pod::Parser itself though ... # [ 0, undef, "=head1" ], # combination double-angles and =for [ 2, '5.006', "=pod\n\nC<< foo >>\n\n=for something\n" ], [ 0, undef, "=pod\n\nSC>" ], # unterminated C< [ 0, undef, "=pod\n\nC<" ], # doubles [ 1, '5.006', "=pod\n\nC<< foo >>" ], [ 0, undef, "=pod\n\nC" ], [ 1, '5.006', "=pod\n\nL< C<< foo >> >" ], [ 1, '5.006', "=item C<< foo >>\n" ], # Pod::MultiLang [ 0, undef, "=pod\n\nJ<< ... >>" ], # links [ 0, undef, "=pod\n\nL" ], [ 0, undef, "=pod\n\nL" ], # links - alt text [ 1, '5.005', "=pod\n\nL" ], [ 0, undef, "=pod\n\nL", above_version => '5.005' ], [ 2, '5.006', "=pod\n\nL>|S<< bar >>>" ], [ 3, '5.006', "=pod\n\nL>|S<< bar >>>", want_reports => 'all' ], # links - url [ 1, '5.008', "=pod\n\nL" ], [ 1, '5.008', "=pod\n\nL", above_version => '5.006' ], [ 0, undef, "=pod\n\nL", above_version => '5.008' ], # links - url and text # 5.005 for text, 5.012 for url+text [ 2, '5.012', "=pod\n\nL" ], [ 1, '5.012', "=pod\n\nL", above_version => '5.010' ], [ 0, undef, "=pod\n\nL", above_version => '5.012' ], [ 0, undef, "=pos\n\nE\n" ], [ 0, undef, "=pos\n\nE\n" ], [ 0, undef, "=pos\n\nE\n" ], # E [ 1, '5.008', "=pos\n\nE\n" ], [ 0, undef, "=pos\n\nE\n", above_version => '5.008' ], # E [ 1, '5.008', "=pos\n\nE\n" ], [ 0, undef, "=pos\n\nE\n", above_version => '5.008' ], # E [ 1, '5.008', "=pos\n\nE\n" ], [ 0, undef, "=pos\n\nE\n", above_version => '5.008' ], # =head3 [ 1, '5.008', "=head3\n" ], [ 0, undef, "=head3\n", above_version => '5.008' ], # =head4 [ 1, '5.008', "=head4\n" ], [ 0, undef, "=head4\n", above_version => '5.008' ], # =encoding [ 1, '5.010', "=encoding\n" ], [ 1, '5.010', "=encoding\n", above_version => '5.008' ], [ 0, undef, "=encoding\n", above_version => '5.010' ], # =for [ 1, '5.004', "=for foo\n" ], [ 1, '5.004', "=for foo\n", above_version => '5.003' ], [ 0, undef, "=for foo\n", above_version => '5.004' ], # =begin [ 1, '5.004', "=begin foo\n" ], [ 1, '5.004', "=begin foo\n", above_version => '5.003' ], [ 0, undef, "=begin foo\n", above_version => '5.004' ], # =end [ 1, '5.004', "=end foo\n" ], [ 1, '5.004', "=end foo\n", above_version => '5.003' ], [ 0, undef, "=end foo\n", above_version => '5.004' ], ) { my ($want_count, $want_minimum_version, $str, @options) = @$data; # MyTestHelpers::diag "POD: $str"; my $pmv = Pod::MinimumVersion->new (string => $str, @options); my @reports = $pmv->reports; # MyTestHelpers::diag explain $pmv; foreach my $report (@reports) { MyTestHelpers::diag ("-- ", $report->as_string); } # MyTestHelpers::diag explain \@reports; my $got_count = scalar @reports; require Data::Dumper; ok ($got_count, $want_count, Data::Dumper->new([$str],['str'])->Indent(0)->Useqq(1)->Dump . Data::Dumper->new([\@options],['options'])->Indent(0)->Dump); ok ($pmv->minimum_version, $want_minimum_version, "minimum_version()"); } #------------------------------------------------------------------------------ # for_version parse out foreach my $data ( [ undef, "" ], [ '5.005', "=for Pod::MinimumVersion use 5.005" ], [ '5.005', "=for\t\tPod::MinimumVersion\t\tuse\t\t5.005" ], ) { my ($want_version, $str, @options) = @$data; # MyTestHelpers::diag ("POD: ",$str); my $pmv = Pod::MinimumVersion->new (string => $str, @options); my @reports = $pmv->analyze; my $got_version = $pmv->{'for_version'}; ok ($got_version, $want_version, '=for Pod::MinimumVersion use 5.005'); } exit 0; Pod-MinimumVersion-50/t/MinimumVersion-load.t0000644000175000017500000000171711535003320017101 0ustar gggg#!/usr/bin/perl -w # Copyright 2011 Kevin Ryde # This file is part of Pod-MinimumVersion. # # Pod-MinimumVersion 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, or (at your option) any # later version. # # Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . ## no critic (RequireUseStrict, RequireUseWarnings) use Pod::MinimumVersion; my $pmv = Pod::MinimumVersion->new (string => ''); $pmv->reports; use Test; BEGIN { plan tests => 1 } ok (1, 1, 'Pod::MinimumVersion load as first thing'); exit 0; Pod-MinimumVersion-50/t/Parser.t0000644000175000017500000000366611545254742014465 0ustar gggg#!/usr/bin/perl -w # Copyright 2008, 2009, 2010, 2011 Kevin Ryde # This file is part of Pod-MinimumVersion. # # Pod-MinimumVersion 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, or (at your option) any later # version. # # Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . use 5.004; use strict; use Test; BEGIN { plan tests => 7; } use lib 't'; use MyTestHelpers; BEGIN { MyTestHelpers::nowarnings() } require Pod::MinimumVersion::Parser; MyTestHelpers::diag ("Pod::Parser version ", Pod::Parser->VERSION); #------------------------------------------------------------------------------ { my $want_version = 50; ok ($Pod::MinimumVersion::Parser::VERSION, $want_version, 'VERSION variable'); ok (Pod::MinimumVersion::Parser->VERSION, $want_version, 'VERSION class method'); { ok (eval { Pod::MinimumVersion::Parser->VERSION($want_version); 1 }, 1, "VERSION class check $want_version"); my $check_version = $want_version + 1000; ok (! eval { Pod::MinimumVersion::Parser->VERSION($check_version); 1 }, 1, "VERSION class check $check_version"); } { my $pmv = Pod::MinimumVersion::Parser->new; ok ($pmv->VERSION, $want_version, 'VERSION object method'); ok (eval { $pmv->VERSION($want_version); 1 }, 1, "VERSION object check $want_version"); my $check_version = $want_version + 1000; ok (! eval { $pmv->VERSION($check_version); 1 }, 1, "VERSION object check $check_version"); } } exit 0; Pod-MinimumVersion-50/MANIFEST0000644000175000017500000000121311545420710013702 0ustar ggggChanges COPYING debian/changelog debian/compat debian/control debian/copyright debian/rules debian/source/format debian/watch devel/run.pl inc/my_pod2html inc/MyMakeMakerExtras.pm lib/Pod/MinimumVersion.pm lib/Pod/MinimumVersion/Parser.pm lib/Pod/MinimumVersion/Report.pm Makefile.PL MANIFEST This list of files MANIFEST.SKIP pod-minimumversion SIGNATURE t/MinimumVersion-load.t t/MinimumVersion.t t/MyTestHelpers.pm t/Parser.t t/Report.t xt/0-META-read.t xt/0-Test-ConsistentVersion.t xt/0-Test-DistManifest.t xt/0-Test-Pod.t xt/0-Test-Synopsis.t xt/0-Test-YAML-Meta.t META.yml Module meta-data (added by MakeMaker) Pod-MinimumVersion-50/inc/0002755000175000017500000000000011545420710013327 5ustar ggggPod-MinimumVersion-50/inc/my_pod2html0000644000175000017500000000750111513475401015513 0ustar gggg#!/usr/bin/perl # my_pod2html -- convert POD to HTML, with some mangling # Copyright 2009, 2010, 2011 Kevin Ryde # my_pod2html is shared by several distributions. # # my_pod2html 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, or (at your option) any later # version. # # my_pod2html 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 file. If not, see . use strict; use warnings; #use Smart::Comments; my $pod2html = MyPod2HTML->new; #

and

both too big, in mozilla at least $pod2html->html_h_level(3); $pod2html->parse_from_file(@ARGV); exit 0; package MyPod2HTML; use base 'Pod::Simple::HTML'; our $VERSION = 1; use constant DEBUG => 0; my %table = ('apt-file' => 'http://packages.debian.org/apt-file', 'apt-cache' => 'http://packages.debian.org/apt', 'apt-rdepends' => 'http://packages.debian.org/apt-rdepends', 'gtk-options' => 'http://manpages.ubuntu.com/manpages/jaunty/man7/gtk-options.7.html', 'xsetroot' => 'http://www.x.org/archive/X1'.'1R7.5/doc/man/man1/xsetroot.1.html', 'leafnode' => 'http://leafnode.sourceforge.net', 'lynx' => 'http://lynx.isc.org/', 'feed2imap' => 'http://home.gna.org/feed2imap', # disguise from grep 'rss'.'2email' => 'http://rss'.'2email.infogami.com', 'rssdrop' => 'http://search.cpan.org/dist/rssdrop/', 'toursst' => 'http://packages.debian.org/etch/toursst', 'netrc' => 'http://linux.die.net/man/5/netrc', # no online man pages apparently at http://man-db.nongnu.org/ 'man' => 'http://ftp.parisc-linux.org/cgi-bin/man/man2html?man+1', 'lexgrog' => 'http://ftp.parisc-linux.org/cgi-bin/man/man2html?lexgrog+1', 'apropos' => 'http://ftp.parisc-linux.org/cgi-bin/man/man2html?apropos+1', ); sub resolve_man_page_link { my ($self, $to, $frag) = @_; $to = "$to"; # Pod::Simple::LinkSection object ### $to if (my ($page, $section) = ($to =~ /(.*)\(\d+\)$/)) { ### $page if (my $url = $table{$page}) { return $url; } } return shift->SUPER::resolve_man_page_link (@_); } sub resolve_pod_link_by_table { my ($self, $to, $section) = @_; my $url; if (defined $to) { if ($to eq 'AptPkg') { $url = 'http://packages.debian.org/libapt-pkg-perl'; } if ($to =~ /^Glib::Ex::(SourceIds|SignalIds|FreezeNotify|TieProperties)/) { $url = "http://user42.tuxfamily.org/glib-ex-ob"."jectbits/$1.html"; } if ($to eq 'Gtk2::Ex::Widget'.'Cursor') { $url = "http://user42.tuxfamily.org/glib-ex-widget'.'cursor/Widget'.'Cursor.html"; } if ($to eq 'Ti'.'e:'.':TZ') { $url = 'http://user42.tuxfamily.org/ti'.'e-'.'tz/TZ.html'; } if ($to eq 'Time:'.':TZ') { $url = 'http://user42.tuxfamily.org/ti'.'e-'.'tz/Time-'.'TZ.html'; } if ($to =~ /^(Glib|Gtk2)($|::(?!Ex::))/) { $to =~ s{::}{/}; $url = "http://gtk2-perl.sourceforge.net/doc/pod/$to.html" } if (defined $url) { return ($url . (defined $section && $section ne '' ? "#$section" : '')); } } return $self->SUPER::resolve_pod_link_by_table($to, $section); } # sub do_pod_link { # my($self, $link) = @_; # if (DEBUG) { # print "\nlink tag=",$link->tagname," type=",$link->attr('type'),"\n"; # print " to=",$link->attr('to')||'[none]',"\n"; # print " section=",$link->attr('section')||'[none]',"\n"; # } # # my $to = $link->attr('to') || ''; # undef if internal link # # return $self->SUPER::do_pod_link($link); # } Pod-MinimumVersion-50/inc/MyMakeMakerExtras.pm0000644000175000017500000003323411543760657017241 0ustar gggg# MyMakeMakerExtra.pm -- my shared MakeMaker extras # Copyright 2009, 2010, 2011 Kevin Ryde # MyMakeMakerExtras.pm is shared by several distributions. # # MyMakeMakerExtras.pm 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, or (at your option) any later # version. # # MyMakeMakerExtras.pm 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 file. If not, see . package MyMakeMakerExtras; use strict; # uncomment this to run the ### lines #use Smart::Comments; my %my_options; sub WriteMakefile { my %opts = @_; if (exists $opts{'META_MERGE'}) { # cf. ExtUtils::MM_Any::metafile_data() default ['t','inc'] foreach ('devel', 'examples', 'junk', 'maybe') { my $dir = $_; if (-d $dir) { push @{$opts{'META_MERGE'}->{'no_index'}->{'directory'}}, $dir; } } $opts{'META_MERGE'}->{'resources'}->{'license'} ||= 'http://www.gnu.org/licenses/gpl.html'; _meta_merge_shared_tests (\%opts); _meta_merge_shared_devel (\%opts); } $opts{'clean'}->{'FILES'} .= ' temp-lintian $(MY_HTML_FILES)'; $opts{'realclean'}->{'FILES'} .= ' TAGS'; if (! defined &MY::postamble) { *MY::postamble = \&MyMakeMakerExtras::postamble; } foreach ('MyMakeMakerExtras_Pod_Coverage', 'MyMakeMakerExtras_LINT_FILES', 'MY_NO_HTML', 'MY_EXTRA_FILE_PART_OF') { $my_options{$_} = delete $opts{$_}; } ### chain to WriteMakefile() ### %opts ExtUtils::MakeMaker::WriteMakefile (%opts); ### done } sub strip_comments { my ($str) = @_; $str =~ s/^\s*#.*\n//mg; $str } #------------------------------------------------------------------------------ # META_MERGE sub _meta_merge_shared_tests { my ($opts) = @_; if (-e 'xt/0-Test-Pod.t') { _meta_merge_req_add (_meta_merge_maximum_tests($opts), 'Test::Pod' => '1.00'); } if (-e 'xt/0-Test-DistManifest.t') { _meta_merge_req_add (_meta_merge_maximum_tests($opts), 'Test::DistManifest' => 0); } if (-e 'xt/0-Test-Synopsis.t') { _meta_merge_req_add (_meta_merge_maximum_tests($opts), 'Test::Synopsis' => 0); } if (-e 'xt/0-Test-YAML-Meta.t') { _meta_merge_req_add (_meta_merge_maximum_tests($opts), 'Test::YAML::Meta' => '0.15'); } if (-e 'xt/0-META-read.t') { if (_min_perl_version_lt ($opts, 5.00307)) { _meta_merge_req_add (_meta_merge_maximum_tests($opts), 'FindBin' => 0); } if (_min_perl_version_lt ($opts, 5.00405)) { _meta_merge_req_add (_meta_merge_maximum_tests($opts), 'File::Spec' => 0); } _meta_merge_req_add (_meta_merge_maximum_tests($opts), 'YAML' => 0, 'YAML::Syck' => 0, 'YAML::Tiny' => 0, 'YAML::XS' => 0, 'Parse::CPAN::Meta' => 0); } } # return hashref of "maximum_tests" under $opts, created if necessary sub _meta_merge_maximum_tests { my ($opts) = @_; $opts->{'META_MERGE'}->{'optional_features'}->{'maximum_tests'} ||= { description => 'Have "make test" do as much as possible.', requires => { }, }; return $opts->{'META_MERGE'}->{'optional_features'}->{'maximum_tests'}->{'requires'}; } sub _meta_merge_shared_devel { my ($opts) = @_; _meta_merge_req_add (_meta_merge_maximum_devel($opts), # the "make unused" target below 'warnings::unused' => 0); if (-e 'inc/my_pod2html') { if (_min_perl_version_lt ($opts, 5.009003)) { _meta_merge_req_add (_meta_merge_maximum_devel($opts), 'Pod::Simple::HTML' => 0); } } } # return hashref of "maximum_devel" under $opts, created if necessary sub _meta_merge_maximum_devel { my ($opts) = @_; $opts->{'META_MERGE'}->{'optional_features'}->{'maximum_devel'} ||= { description => 'Stuff used variously for development.', requires => { }, }; return $opts->{'META_MERGE'}->{'optional_features'}->{'maximum_devel'}->{'requires'}; } # return true if MIN_PERL_VERSION in $opts is < $ver, or no MIN_PERL_VERSION sub _min_perl_version_lt { my ($opts, $perlver) = @_; return (! defined $opts->{'MIN_PERL_VERSION'} || $opts->{'MIN_PERL_VERSION'} < $perlver); } sub _meta_merge_req_add { my $req = shift; ### MyMakeMakerExtras META_MERGE: @_ while (@_) { my $module = shift; my $version = shift; if (defined $req->{$module}) { if ($req->{$module} > $version) { $version = $req->{$module}; } } $req->{$module} = $version; } } #------------------------------------------------------------------------------ # postamble() sub postamble { my ($makemaker) = @_; ### MyMakeMakerExtras postamble(): $makemaker my $post = $my_options{'postamble_docs'}; my @exefiles_html; my @pmfiles_html; unless ($my_options{'MY_NO_HTML'}) { $post .= <<'HERE'; #------------------------------------------------------------------------------ # docs stuff -- from inc/MyMakeMakerExtras.pm MY_POD2HTML = $(PERL) inc/my_pod2html HERE my $munghtml_extra = $makemaker->{'MY_MUNGHTML_EXTRA'}; if ($munghtml_extra) { $post =~ s/apt-file!'/apt-file!'\\ $munghtml_extra/; } my @pmfiles = keys %{$makemaker->{'PM'}}; @pmfiles = grep {!/\.mo$/} @pmfiles; # not LocaleData .mo files my @exefiles = (defined $makemaker->{'EXE_FILES'} ? @{$makemaker->{'EXE_FILES'}} : ()); my %html_files; my $html_rule = sub { my ($pm) = @_; my $fullhtml = $pm; $fullhtml =~ s{lib/}{}; # remove lib/ $fullhtml =~ s{\.p[ml]$}{}; # remove .pm or .pl $fullhtml .= '.html'; my $parthtml = $fullhtml; $fullhtml =~ s{/}{-}g; # so Foo-Bar.html unless ($html_files{$fullhtml}++) { $post .= <<"HERE"; $fullhtml: $pm Makefile \$(MY_POD2HTML) $pm >$fullhtml HERE } $parthtml =~ s{.*/}{}; # remove any directory part, just Bar.html unless ($html_files{$parthtml}++) { $post .= <<"HERE"; $parthtml: $pm Makefile \$(MY_POD2HTML) $pm >$parthtml HERE } return $parthtml; }; foreach (@exefiles) { push @exefiles_html, &$html_rule ($_); } foreach (@pmfiles) { push @pmfiles_html, &$html_rule ($_); } $post .= "MY_HTML_FILES = " . join(' ', keys %html_files) . "\n"; $post .= <<'HERE'; html: $(MY_HTML_FILES) HERE } $post .= <<'HERE'; #------------------------------------------------------------------------------ # development stuff -- from inc/MyMakeMakerExtras.pm version: $(NOECHO)$(ECHO) $(VERSION) HERE my $lint_files = $my_options{'MyMakeMakerExtras_LINT_FILES'}; if (! defined $lint_files) { $lint_files = 'Makefile.PL $(EXE_FILES) $(TO_INST_PM)'; # would prefer not to lock down the 't' dir existance at ./Makefile.PL # time, but it's a bit hard without without GNU make extensions if (-d 't') { $lint_files .= ' t/*.t'; } if (-d 'xt') { $lint_files .= ' xt/*.t'; } foreach ('examples', 'devel') { my $dir = $_; my $pattern = "$dir/*.pl"; if (glob ($pattern)) { $lint_files .= " $pattern"; } } } my $podcoverage = ''; foreach (@{$my_options{'MyMakeMakerExtras_Pod_Coverage'}}) { my $class = $_; # the "." obscures it from MyExtractUse.pm $podcoverage .= "\t-\$(PERLRUNINST) -e 'use "."Pod::Coverage package=>$class'\n"; } $post .= "LINT_FILES = $lint_files\n" . <<'HERE'; lint: perl -MO=Lint $(LINT_FILES) pc: HERE # "podchecker -warnings -warnings" too much reporting every < and > $post .= $podcoverage . <<'HERE'; -podlinkcheck -I lib `ls $(LINT_FILES) | grep -v '\.bash$$|\.desktop$$\.png$$|\.xpm$$'` -podchecker `ls $(LINT_FILES) | grep -v '\.bash$$|\.desktop$$\.png$$|\.xpm$$'` perlcritic $(LINT_FILES) unused: for i in $(LINT_FILES); do perl -Mwarnings::unused -I lib -c $$i; done HERE $post .= <<'HERE'; myman: -mv MANIFEST MANIFEST.old touch SIGNATURE (make manifest 2>&1; diff -u MANIFEST.old MANIFEST) |less # find files in the dist with mod times this year, but without this year in # the copyright line check-copyright-years: year=`date +%Y`; \ tar tvfz $(DISTVNAME).tar.gz \ | egrep "$$year-|debian/copyright" \ | sed 's:^.*$(DISTVNAME)/::' \ | (result=0; \ while read i; do \ GREP=grep; \ case $$i in \ '' | */ \ | ppport.h \ | debian/changelog | debian/compat | debian/doc-base \ | debian/patches/*.diff | debian/source/format \ | COPYING | MANIFEST* | SIGNATURE | META.yml \ | version.texi | */version.texi \ | *utf16* | examples/rs''s2lea''fnode.conf \ | */MathI''mage/ln2.gz | */MathI''mage/pi.gz \ | *.mo | *.locatedb* | t/samp.*) \ continue ;; \ *.gz) GREP=zgrep ;; \ esac; \ if test -e "$(srcdir)/$$i"; then f="$(srcdir)/$$i"; \ else f="$$i"; fi; \ if ! $$GREP -q "Copyright.*$$year" $$f; then \ echo "$$i":"1: this file"; \ grep Copyright $$f; \ result=1; \ fi; \ done; \ exit $$result) # only a DEBUG non-zero number is bad, so an expression can copy a debug from # another package check-debug-constants: if egrep -nH 'DEBUG => [1-9]|^[ \t]*(use|no) Smart::Comments' $(EXE_FILES) $(TO_INST_PM) t/*.t xt/*.t; then exit 1; else exit 0; fi check-spelling: if find . -type f | egrep -v '(Makefile|dist-deb)' | xargs egrep --color=always -nHi '[g]rabing|[c]usor|[r]efering|[w]riteable|[n]ineth|\b[o]mmitt?ed|[o]mited|[$$][rd]elf|[r]equrie|[n]oticable|[c]ontinous|[e]xistant|[e]xplict|[a]gument|[d]estionation|\b[t]he the\b|\b[i]n in\b|\b[tw]hen then\b|\b[n]ote sure\b'; \ then false; else true; fi HERE $post .= "\n"; $post .= ("MY_EXTRA_FILE_PART_OF = " . ($my_options{'MY_EXTRA_FILE_PART_OF'}||'') . "\n"); $post .= <<'HERE'; check-file-part-of: if grep --text 'This file is'' part of ' -r . | egrep -iv '$(DISTNAME)$(MY_EXTRA_FILE_PART_OF)'; then false; else true; fi diff-prev: rm -rf diff.tmp mkdir diff.tmp cd diff.tmp \ && tar xfz ../$(DISTNAME)-`expr $(VERSION) - 1`.tar.gz \ && tar xfz ../$(DISTNAME)-$(VERSION).tar.gz -cd diff.tmp; diff -ur $(DISTNAME)-`expr $(VERSION) - 1` \ $(DISTNAME)-$(VERSION) >tree.diff -$${PAGER:-less} diff.tmp/tree.diff rm -rf diff.tmp # in a hash-style multi-const this "use constant" pattern only picks up the # first constant, unfortunately, but it's better than nothing TAG_FILES = $(TO_INST_PM) TAGS: $(TAG_FILES) etags \ --regex='{perl}/use[ \t]+constant\(::defer\)?[ \t]+\({[ \t]*\)?\([A-Za-z_][^ \t=,;]+\)/\3/' \ $(TAG_FILES) HERE my $have_XS = scalar %{$makemaker->{'XS'}}; my $arch = ($have_XS ? `dpkg --print-architecture` : 'all'); chomp($arch); my $debname = (defined $makemaker->{'EXE_FILES'} ? lc($makemaker->{'DISTNAME'}) : lc("lib$makemaker->{'DISTNAME'}-perl")); $post .= "DEBNAME = $debname\n" . "DPKG_ARCH = $arch\n" . <<'HERE'; DEBVNAME = $(DEBNAME)_$(VERSION)-1 DEBFILE = $(DEBVNAME)_$(DPKG_ARCH).deb # ExtUtils::MakeMaker 6.42 of perl 5.10.0 makes "$(DISTVNAME).tar.gz" depend # on "$(DISTVNAME)" distdir directory, which is always non-existent after a # successful dist build, so the .tar.gz is always rebuilt. # # So although the .deb depends on the .tar.gz don't express that here or it # rebuilds the .tar.gz every time. # # The right rule for the .tar.gz would be to depend on the files which go # into it of course ... # # DISPLAY is unset for making a deb since under fakeroot gtk stuff may try # to read config files like ~/.pangorc from root's home dir /root/.pangorc, # and that dir will be unreadable by ordinary users (normally), provoking # warnings and possible failures from nowarnings(). # $(DEBFILE) deb: test -f $(DISTVNAME).tar.gz || $(MAKE) $(DISTVNAME).tar.gz debver="`dpkg-parsechangelog -c1 | sed -n -r -e 's/^Version: (.*)-[0-9.]+$$/\1/p'`"; \ echo "debver $$debver", want $(VERSION); \ test "$$debver" = "$(VERSION)" rm -rf $(DISTVNAME) tar xfz $(DISTVNAME).tar.gz unset DISPLAY; export DISPLAY; \ cd $(DISTVNAME) \ && dpkg-checkbuilddeps debian/control \ && fakeroot debian/rules binary rm -rf $(DISTVNAME) lintian-deb: $(DEBFILE) lintian -I -i --suppress-tags new-package-should-close-itp-bug \ $(DEBFILE) lintian-source: rm -rf temp-lintian; \ mkdir temp-lintian; \ cd temp-lintian; \ cp ../$(DISTVNAME).tar.gz $(DEBNAME)_$(VERSION).orig.tar.gz; \ tar xfz $(DEBNAME)_$(VERSION).orig.tar.gz; \ mv -T $(DISTVNAME) $(DEBNAME)-$(VERSION); \ dpkg-source -b $(DEBNAME)-$(VERSION) \ $(DEBNAME)_$(VERSION).orig.tar.gz; \ lintian -I -i --suppress-tags empty-debian-diff *.dsc; \ cd ..; \ rm -rf temp-lintian HERE { my $list_html = join(' ',@exefiles_html); if (! $list_html && @pmfiles_html <= 3) { $list_html = join(' ',@pmfiles_html); } if (! -e 'inc/my_pod2html') { $list_html = ''; } my $make_list_html = ($list_html ? "\n\tmake $list_html" : ""); $post .= <<"HERE"; my-list:$make_list_html ls -l -U $list_html \$(EXE_FILES) *.tar.gz *.deb HERE $post .= <<'HERE'; @echo -n '$(DEBFILE) ' @dpkg-deb -f $(DEBFILE) | grep Installed-Size HERE if ($list_html) { $post .= "\trm -f $list_html\n"; } } return $post; } 1; __END__ Pod-MinimumVersion-50/MANIFEST.SKIP0000644000175000017500000000537411535010754014465 0ustar gggg#!/usr/bin/perl # MANIFEST.SKIP -- my various excluded files # Copyright 2008, 2009, 2010, 2011 Kevin Ryde # This file is shared among several distributions. # # This file 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, or (at your option) # any later version. # # This file 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 file. If not, see . # cf. /usr/share/perl/5.10/ExtUtils/MANIFEST.SKIP # emacs backups ~$ # emacs locks (^|/)\.# # emacs autosave (^|/)# # own distdir ^[A-Za-z][A-Za-z0-9-_]*-\d+/ # own dist files \.tar$ \.tar\.gz$ \.deb$ # ExtUtils::MakeMaker leaving Makefile.old # and "myman" leaving MANIFEST.old \.old$ # ExtUtils::MakeMaker "metafile" rule temporary, left behind if interrupted ^META_new\.yml$ # built - MakeMaker ^Makefile$ ^blib ^pm_to_blib ^TAGS$ # MakeMaker 6.18 to 6.25, apparently ^blibdirs\.ts$ # msdos compiler output stuff using gcc, # "XSFILENAME.def" extension, and others fixed names it seems \.def$ ^dll\.base$ ^dll\.exp$ # msdos compiler stuff using ms c \.pdb$ # built - recent Module::Build nonsense ^MYMETA\.yml$ # built - cdbs and debhelper ^debian/stamp- ^debian/.*\.log$ # built - texinfo.tex temporaries \.(aux|cp|cps|fn|fns|ky|log|pg|toc|tp|tps|vr)$ # toplevel .c files built from .xs ^[^/]+\.c$ # built .o compiled and .bs from .xs \.o$ \.obj$ \.bs$ # #(^|/)[A-Z][A-Za-z0-9_]*\.c$ #/[^Z])[^/]+\.c$ # built - configury ^a\.out$ ^conftest ^config\.h$ ^myconfig\.h$ # built - toplevel html pages ^[a-zA-Z][^./]+\.html$ # cpantesters reports ^msg\d*\.html$ # inc/MyMakefileExtras.pm "diff-prev" ^diff\.tmp # inc/MyMakefileExtras.pm "lintian-source" ^temp-lintian # some of my im module testing ^tempfile\.png$ # my dists ^dist-deb ^up$ ^c$ # special case p..ulp test build stuff devel/h2xs/TestConstFoo/ # special case mall executables ^devel/hblk$ ^devel/mallopt$ ^devel/mallstats$ ^devel/malltrim$ # special case fli executables ^devel/mmap-multi$ # special case widget-bits executables ^devel/grandom$ ^devel/grandom-[a-z]+$ # special case widget-cursor executables ^devel/invisible-blank$ # special case x'or executables ^devel/gtk-gc-colour$ # special case ipw and other executables ^devel/misc$ # special case m-i executables ^devel/gen-bits$ # special case combo executables ^devel/toolbutton-overflow-leak$ # special htmlext environs ^test-dist/ \.junk$ \.bak$ ^backup ^misc ^maybe ^samples ^samp ^formats Pod-MinimumVersion-50/lib/0002755000175000017500000000000011545420710013324 5ustar ggggPod-MinimumVersion-50/lib/Pod/0002755000175000017500000000000011545420710014046 5ustar ggggPod-MinimumVersion-50/lib/Pod/MinimumVersion.pm0000644000175000017500000003053411545420565017400 0ustar gggg# Copyright 2009, 2010, 2011 Kevin Ryde # This file is part of Pod-MinimumVersion. # Pod-MinimumVersion 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, or (at your option) any later # version. # # Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . package Pod::MinimumVersion; use 5.004; use strict; use List::Util; use version; use vars qw($VERSION @CHECKS); # uncomment this to run the ### lines #use Smart::Comments; $VERSION = 50; sub new { my ($class, %self) = @_; $self{'want_reports'} ||= 'one_per_version'; return bless \%self, $class; } sub minimum_version { my ($self) = @_; my $report = $self->minimum_report || return undef; return $report->{'version'}; } sub minimum_report { my ($self) = @_; if (! exists $self->{'minimum_report'}) { $self->{'minimum_report'} = List::Util::reduce {$a->{'version'} > $b->{'version'} ? $a : $b} $self->reports; } return $self->{'minimum_report'}; } sub reports { my ($self) = @_; $self->analyze; return @{$self->{'reports'} || []}; } sub analyze { my ($self) = @_; return if $self->{'analyzed'}; $self->{'analyzed'} = 1; ### Pod-MinVer analyze() my %checks; foreach my $elem (@CHECKS) { my ($func, $command, $version) = @$elem; next if ($self->{'above_version'} && $version <= $self->{'above_version'}); push @{$checks{$command}}, $func; } return if (! %checks); require Pod::MinimumVersion::Parser; my $parser = Pod::MinimumVersion::Parser->new (pmv => $self, checks => \%checks); if (exists $self->{'string'}) { $parser->parse_from_string ("$self->{'string'}"); } elsif (exists $self->{'filehandle'}) { $parser->parse_from_filehandle ($self->{'filehandle'}); } elsif (exists $self->{'filename'}) { # stringize to parse_from_file() taking an overloaded object to be a handle # ENHANCE-ME: perhaps opening here and parse_from_filehandle() would be # a better way to avoid $parser->parse_from_file ("$self->{'filename'}"); } } #------------------------------------------------------------------------------ # 5.004 # # E<> newly documented in 5.004, but is in pod2man right back to 5.002, so # don't report that { my $v5004 = version->new('5.004'); # =for, =begin, =end new in 5.004 # push @CHECKS, [ \&_check_for_begin_end, 'command', $v5004 ]; my %for_begin_end = (for => 1, begin => 1, end => 1); sub _check_for_begin_end { my ($self, $command, $text, $para_obj) = @_; if ($for_begin_end{$command}) { $self->report ('for_begin_end', $v5004, $para_obj, "=$command command"); } } } #------------------------------------------------------------------------------ # 5.005 { my $v5005 = version->new('5.005'); # L display alternative new in 5.005 # push @CHECKS, [ \&_check_link_display_text, 'interior_sequence', $v5005 ]; sub _check_link_display_text { my ($self, $command, $arg, $seq_obj) = @_; if ($command eq 'L' && $arg =~ /\|/) { $self->report ('link_display_text', $v5005, $seq_obj, 'Display text L link'); } } } #------------------------------------------------------------------------------ # 5.006 { my $v5006 = version->new('5.006'); push @CHECKS, [ \&_check_double_angles, 'interior_sequence', $v5006 ]; sub _check_double_angles { my ($self, $command, $arg, $seq_obj) = @_; if ($seq_obj->left_delimiter =~ /^<report ('double_angles', $v5006, $seq_obj, 'Double angle brackets C<< foo >>'); } } } #------------------------------------------------------------------------------ # 5.008 { my $v5008 = version->new('5.008'); # =head3 and =head4 new in 5.8.0 push @CHECKS, [ \&_check_head34, 'command', $v5008 ]; my %head34 = (head3 => 1, head4 => 1); sub _check_head34 { my ($self, $command, $text, $para_obj) = @_; if ($head34{$command}) { $self->report ('head34', $v5008, $para_obj, "=$command command"); } } # E and E documented in 5.6.0, but Pod::Man only has them in # 5.8.0, so rate them as a 5008 feature # # E is in Pod::Man of 5.8.0, though not documented explicitly # push @CHECKS, [ \&_check_E_5008, 'interior_sequence', $v5008 ]; my %E_5008 = (apos => 1, sol => 1, verbar => 1); sub _check_E_5008 { my ($self, $command, $arg, $seq_obj) = @_; if ($command eq 'E' && $E_5008{$arg}) { $self->report ('E_5008', $v5008, $seq_obj, "E<$arg> escape"); } } # L urls new in 5.8.0 # # In 5.6 and earlier the "/" is interpreted as a section, so from # L you get something bad like # # the section on "/foo.com/index.html" in the http: manpage # # Crib note: a "|" display text part is not allowed with a url, according # to perlpodspec of perl 5.10.0 under the "Authors wanting to link to a # particular (absolute) URL" bullet point. So no need to watch for that # in applying this test. # push @CHECKS, [ \&_check_link_url, 'interior_sequence', $v5008 ]; sub _check_link_url { my ($self, $command, $arg, $seq_obj) = @_; # this regexp as recommended by perlpodspec of perl 5.10.0 if ($command eq 'L' && $arg =~ m/\A\w+:[^:\s]\S*\z/) { $self->report ('link_url', $v5008, $seq_obj, 'L<> link to URL'); } } } #------------------------------------------------------------------------------ # 5.010 { my $v5010 = version->new('5.010'); # =encoding documented in 5.8.0, but Pod::Man doesn't recognise it until # 5.10.0, so rate it as a 5010 feature # push @CHECKS, [ \&_check_encoding, 'command', $v5010 ]; sub _check_encoding { my ($self, $command, $text, $para_obj) = @_; if ($command eq 'encoding') { $self->report ('encoding', $v5010, $para_obj, '=encoding command'); } } } #------------------------------------------------------------------------------ # 5.012 { my $v5012 = version->new('5.012'); # L documented in 5.12.0 where previously explicitly prohibited, # rate it as a 5012 feature # push @CHECKS, [ \&_check_link_url_with_text, 'interior_sequence', $v5012 ]; sub _check_link_url_with_text { my ($self, $command, $arg, $seq_obj) = @_; # this regexp adapted from recommendation of perlpodspec from perl 5.10.0 if ($command eq 'L' && $arg =~ m/\A.*\|\w+:[^:\s]\S*\z/) { $self->report ('link_url_with_text', $v5012, $seq_obj, 'L<> link with URL and text'); } } } #------------------------------------------------------------------------------ sub report { my ($self, $name, $version, $pod_obj, $why) = @_; if ($self->{'want_reports'} eq 'one_per_check') { return if ($self->{'seen'}->{$name}++); } if ($self->{'want_reports'} eq 'one_per_version') { return if ($self->{'seen'}->{$version}++); } my ($filename, $linenum) = $pod_obj->file_line; if (defined $self->{'filename'}) { $filename = $self->{'filename'}; } require Pod::MinimumVersion::Report; push @{$self->{'reports'}}, Pod::MinimumVersion::Report->new (filename => $filename, name => $name, linenum => $linenum, version => $version, why => $why); } 1; __END__ =for stopwords Ryde Pod-MinimumVersion =head1 NAME Pod::MinimumVersion - Perl version for POD directives used =head1 SYNOPSIS use Pod::MinimumVersion; my $pmv = Pod::MinimumVersion->new (filename => '/some/foo.pl'); print $pmv->minimum_version,"\n"; print $pmv->reports; =head1 DESCRIPTION C parses the POD in a Perl script, module, or document, and reports what version of Perl is required to process the directives in it with C etc. =head1 CHECKS The following POD features are identified. =over 4 =item * 5.004: new C<=for>, C<=begin> and C<=end> =item * 5.005: new LEdisplay text|targetE style display part =item * 5.6.0: new CEE foo EE etc double-angles =item * 5.8.0: new C<=head3> and C<=head4> =item * 5.8.0: new LEhttp://some.where.comE URLs. (Before 5.8 the "/" is a "section" separator, giving very poor output.) =item * 5.8.0: new EEaposE, EEsolE, EEverbarE chars. (Documented in 5.6.0, but pod2man doesn't recognise them until 5.8.) =item * 5.10.0: new C<=encoding> command. (Documented in 5.8.0, but C doesn't recognise it until 5.10.) =item * 5.12.0: new LEdisplay text|http://some.where.comE URL with text. (Before 5.12 the combination of display part and URL was explicitly disallowed by L.) =back POD syntax errors are quietly ignored currently. The intention is only to check what C would act on but it's probably a good idea to use C first. SE EE>> for C is recognised and is allowed for any Perl, including with double-angles. The assumption is that if you're writing that then you'll first crunch with the C tools, so it's not important what C thinks of it. =head1 FUNCTIONS =over 4 =item C<$pmv = Pod::MinimumVersion-Enew (key =E value, ...)> Create and return a new C object which will analyze a document. The document is supplied as one of filehandle => $fh, string => 'something', filename => '/my/dir/foo.pod', For C and C, a C can be supplied too to give a name in the reports. The handle or string is what's actually read. The C option lets you set a Perl version of you have or are targeting, so reports are only about features above that level. above_version => '5.006', =item C<$version = $pmv-Eminimum_version ()> =item C<$report = $pmv-Eminimum_report ()> Return the minimum Perl required for the document in C<$pmv>. C returns a C number object (see L). C returns a C object (see L below). =item C<@reports = $pmv-Ereports ()> Return a list of C objects concerning the document in C<$pmv>. These multiple reports let you identify multiple places that a particular Perl is required. With the C option the reports are only about things higher than that. C and C are simply the highest Perl among these multiple reports. =back =head1 REPORT OBJECTS A C object holds a location within a document and a reason that a particular Perl is needed at that point. The hash fields are filename string linenum integer, with 1 for the first line version version.pm object why string =over 4 =item C<$str = $report-Eas_string> Return a formatted string for the report. Currently this is in GNU file:line style, simply :: due to =back =head1 SEE ALSO L, L, L L, L, L =head1 HOME PAGE http://user42.tuxfamily.org/pod-minimumversion/index.html =head1 COPYRIGHT Copyright 2009, 2010, 2011 Kevin Ryde Pod-MinimumVersion 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, or (at your option) any later version. Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . =cut Pod-MinimumVersion-50/lib/Pod/MinimumVersion/0002755000175000017500000000000011545420710017027 5ustar ggggPod-MinimumVersion-50/lib/Pod/MinimumVersion/Parser.pm0000644000175000017500000001074711545254752020643 0ustar gggg# Copyright 2009, 2010, 2011 Kevin Ryde # This file is part of Pod-MinimumVersion. # Pod-MinimumVersion 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, or (at your option) any later # version. # # Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . package Pod::MinimumVersion::Parser; use 5.004; use strict; use vars '$VERSION', '@ISA'; use Pod::Parser; @ISA = ('Pod::Parser'); $VERSION = 50; # uncomment this to run the ### lines #use Smart::Comments; sub new { my $class = shift; my $self = $class->SUPER::new(@_); $self->errorsub ('error_handler'); # method name return $self; } sub error_handler { my ($self, $errmsg) = @_; ### PMV error_handler() return 1; # error handled } # sub begin_input { # print "begin_input\n"; # } # sub end_input { # print "end_input\n"; # } sub parse_from_string { my ($self, $str) = @_; ### PMV parse_from_string() require IO::String; my $fh = IO::String->new ($str); $self->{_INFILE} = "(string)"; return $self->parse_from_filehandle ($fh); } my %command_does_not_interpolate = (for => 1, # free form text begin => 1, # formatname not text end => 1, pod => 1, # text ignored cut => 1, # text ignored encoding => 1, # encoding name not text ); sub command { my ($self, $command, $text, $linenum, $paraobj) = @_; ### PMV command() ### $command ### $text ### $linenum # If =foo command at EOF with no more chars, including no trailing # newline, then $text is undef (circa Pod::Parser 1.37 at least). # if (defined $text) { if ($command eq 'for' && $text =~ /^Pod::MinimumVersion\s+use\s+(v?[0-9._]+)/) { $self->{'pmv'}->{'for_version'} = version->new($1); } foreach my $func (@{$self->{'checks'}->{'command'}}) { $func->($self->{'pmv'}, $command, $text, $paraobj); } unless ($command_does_not_interpolate{$command}) { $self->interpolate ($text, $linenum); } } return ''; } sub verbatim { ### PMV verbatim() return ''; } sub textblock { my ($self, $text, $linenum, $paraobj) = @_; ### PMV textblock() ### $text return $self->interpolate ($text, $linenum); } sub interior_sequence { my ($self, $command, $arg, $seq_obj) = @_; ### interior ### $command ### $arg ### $seq_obj ### raw_text: $seq_obj->raw_text ### left: $seq_obj->left_delimiter ### nested: do { my $outer = $seq_obj->nested; $outer && $outer->cmd_name } # J<> from Pod::MultiLang -- doubled C<<>> or L<|display> are allowed # ENHANCE-ME: might prefer to make parse_tree() not descend into J<> at # all, but it doesn't seem setup for that my $outer; if ($command eq 'J' || (($outer = $seq_obj->nested) && $outer->cmd_name eq 'J')) { return ''; } foreach my $func (@{$self->{'checks'}->{'interior_sequence'}}) { $func->($self->{'pmv'}, $command, $arg, $seq_obj); } return ''; } 1; __END__ =for stopwords Ryde Pod-MinimumVersion =head1 NAME Pod::MinimumVersion::Parser - parser used by Pod::MinimumVersion =head1 DESCRIPTION This is an internal part of C, not meant for other use. =head1 SEE ALSO L =head1 HOME PAGE http://user42.tuxfamily.org/pod-minimumversion/index.html =head1 COPYRIGHT Copyright 2009, 2010, 2011 Kevin Ryde Pod-MinimumVersion 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, or (at your option) any later version. Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . =cut Pod-MinimumVersion-50/lib/Pod/MinimumVersion/Report.pm0000644000175000017500000000403711545254743020655 0ustar gggg# Copyright 2009, 2010, 2011 Kevin Ryde # This file is part of Pod-MinimumVersion. # Pod-MinimumVersion 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, or (at your option) any later # version. # # Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . package Pod::MinimumVersion::Report; use 5.004; use strict; use overload '""' => \&as_string; use vars '$VERSION'; $VERSION = 50; sub new { my ($class, %self) = @_; return bless \%self, $class; } # not sure about this ... sub as_string { my ($self) = @_; return "$self->{'filename'}:$self->{'linenum'}: $self->{'version'} due to $self->{'why'}"; } 1; __END__ =for stopwords Ryde Pod-MinimumVersion =head1 NAME Pod::MinimumVersion::Report - report object from Pod::MinimumVersion =head1 DESCRIPTION See C. =head1 SEE ALSO L =head1 HOME PAGE http://user42.tuxfamily.org/pod-minimumversion/index.html =head1 COPYRIGHT Copyright 2009, 2010, 2011 Kevin Ryde Pod-MinimumVersion 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, or (at your option) any later version. Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . =cut Pod-MinimumVersion-50/pod-minimumversion0000755000175000017500000000605011545420656016355 0ustar gggg#!perl -w # Copyright 2011 Kevin Ryde # This file is part of Pod-MinimumVersion. # # Pod-MinimumVersion 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, or (at your option) any later # version. # # Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . use 5.004; use strict; use Getopt::Long; use Pod::MinimumVersion; use vars '$VERSION'; $VERSION = 50; my $want_stdin = 1; my $want_all = 1; Getopt::Long::Configure ('no_ignore_case'); Getopt::Long::GetOptions ('all' => \$want_all, 'help|?' => sub { print <<'HERE'; pod-minimumversion [--options] [filename...] --help print this help --version print program version number HERE $want_stdin = 0; }, 'version' => sub { print "pod-minimumversion $VERSION\n"; $want_stdin = 0; }, '<>' => sub { my ($arg) = @_; report (filename => "$arg"); $want_stdin = 0; }, ) or exit 1; if ($want_stdin) { report (filehandle => \*STDIN, filename => '(stdin)'); } sub report { my $pmv = Pod::MinimumVersion->new (@_); foreach my $report ($want_all ? $pmv->reports : $pmv->minimum_report) { print "$report->{'filename'}:$report->{'linenum'}: $report->{'version'} for $report->{'why'}\n"; } } exit 0; __END__ =for stopwords Ryde Pod-MinimumVersion pod-minimumversion =head1 NAME pod-minimumversion -- report minimum Perl version for given POD =head1 SYNOPSIS pod-minimumversion [--options] [filename...] =head1 DESCRIPTION C reports the minimum Perl version required to process POD directives in given files, or the standard input if no files are given. =head1 OPTIONS =over =item --help, -? Print a summary of the options. =item --version Print the program version number. =back =head1 SEE ALSO L L, L =head1 HOME PAGE http://user42.tuxfamily.org/pod-minimumversion/index.html =head1 LICENSE Pod-MinimumVersion is Copyright 2009, 2010, 2011 Kevin Ryde Pod-MinimumVersion 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, or (at your option) any later version. Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . =cut Pod-MinimumVersion-50/devel/0002755000175000017500000000000011545420710013655 5ustar ggggPod-MinimumVersion-50/devel/run.pl0000644000175000017500000000351111545253742015025 0ustar gggg#!/usr/bin/perl -w # Copyright 2009, 2010, 2011 Kevin Ryde # This file is part of Pod-MinimumVersion. # # Pod-MinimumVersion 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, or (at your option) any # later version. # # Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . use strict; use FindBin; use File::Spec; use Pod::MinimumVersion; use Data::Dumper; # uncomment this to run the ### lines use Smart::Comments; my $script_filename = File::Spec->catfile ($FindBin::Bin, $FindBin::Script); { my $pmv = Pod::MinimumVersion->new ( # string => "use 5.010; =encoding\n", # string => "=encoding", # string => "=pod\n\nC<< foo >>", filename => $script_filename, # filehandle => do { require IO::String; IO::String->new("=pod\n\nE E") }, # string => "=pod\n\nL", one_report_per_version => 1, above_version => '5.005', ); ### $pmv ### min: $pmv->minimum_version ### $pmv my @reports = $pmv->reports; foreach my $report (@reports) { print $report->as_string,"\n"; # my $loc = $report->PPI_location; # print Data::Dumper->new ([\$loc],['loc'])->Indent(0)->Dump,"\n"; } exit 0; } use 5.002; __END__ =head1 C<< NAME >> =encoding utf-8 x =head1 DESCRIPTION =head1 Heading J<< C<< x >> >> C<< double >> S<< double >> L|Footext> =begin foo text meant only for foo ... =end foo =cut Pod-MinimumVersion-50/SIGNATURE0000644000175000017500000000521411545420711014043 0ustar ggggThis file contains message digests of all files listed in MANIFEST, signed via the Module::Signature module, version 0.66. 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 842745cb706f8f2126506f544492f7a80dbe29b3 COPYING SHA1 351dadb766f5f9af91aad73451f8337d2031cfce Changes SHA1 c56e716f9e7e60a836b040b44d5154839c0be58b MANIFEST SHA1 f42e495e55aa5c6fa78de6ca47938b84cd7015b2 MANIFEST.SKIP SHA1 913c4e56d3ea2748800eb2aeeb420f95aa102cd6 META.yml SHA1 f610fe914e693ff599a210c9a1acac2c49ec4d0c Makefile.PL SHA1 6148aa095786f646345bef3d0e2cc66679eafb73 debian/changelog SHA1 ac3478d69a3c81fa62e60f5c3696165a4e5e6ac4 debian/compat SHA1 d3b030d15305257889acfb1c2ac78f6a144a5efa debian/control SHA1 6b2745e510af08187a454f30ae06e085a5801788 debian/copyright SHA1 f522c9df11531b41d03e50a2b25446b60003a01c debian/rules SHA1 61652cd1568dcf2614df833eba241755eee34e89 debian/source/format SHA1 37f58be17294a6a26f50c8fbe7838009169c8acb debian/watch SHA1 667864d1d5bae1448e3e48a778475f59bbd1a7ea devel/run.pl SHA1 bf443c3e4bc114cc301d217c60dc68355227948d inc/MyMakeMakerExtras.pm SHA1 7a988b2aa7ed09f1cb9029a1ef3f0e2139dca0cf inc/my_pod2html SHA1 63f4857636afa8a1a9a1de8a7cb2d50b92032eb3 lib/Pod/MinimumVersion.pm SHA1 68a0d5a452968f90b36765cd8ff10392d53b219c lib/Pod/MinimumVersion/Parser.pm SHA1 cebe855b8cbfaf43cb88bd5189cc1c05499dd111 lib/Pod/MinimumVersion/Report.pm SHA1 a6655aba49011c6841a03334f424b34514139a15 pod-minimumversion SHA1 bd4edb2622a226dd37223d208ee13c0067784123 t/MinimumVersion-load.t SHA1 c342729c118022a40833847e477d7e0f4097f6ed t/MinimumVersion.t SHA1 51456d64ca8f20d6808f6f3c8aa1f4f2553cb78d t/MyTestHelpers.pm SHA1 7aa51325e92d27796f1656db7e6e8ae6920c5ceb t/Parser.t SHA1 e75d91bf935e0212dd98ad029be150b9e7a56a91 t/Report.t SHA1 0279c9310ec528d10a2a14e602bf98f1c776cce1 xt/0-META-read.t SHA1 219395eb91b03829e6f14db4ebd57d88ea972e61 xt/0-Test-ConsistentVersion.t SHA1 8a5e0f34131de34e584fbb1939c191a152566155 xt/0-Test-DistManifest.t SHA1 cc04a5fe5d8b8b38bfd56453d5d2686c8ea58783 xt/0-Test-Pod.t SHA1 8cc52e23427a82cfef5802bf512b13c65de2687a xt/0-Test-Synopsis.t SHA1 4c14845872d6eb4280e12f862d6ba2c343358c60 xt/0-Test-YAML-Meta.t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFNliHJLFMCIV9q3ToRAjGrAJ9cWP7WK3ykTMIm/5vR1a6MjNACIACfX22o YzGjwyoZgVzgV9thphpRQ7U= =JREQ -----END PGP SIGNATURE----- Pod-MinimumVersion-50/Makefile.PL0000755000175000017500000000432311537520670014542 0ustar gggg#!/usr/bin/perl # Copyright 2010, 2011 Kevin Ryde # This file is part of Pod-MinimumVersion. # # Pod-MinimumVersion 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, or (at your option) any later # version. # # Pod-MinimumVersion 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 Pod-MinimumVersion. If not, see . use 5.004; use strict; use ExtUtils::MakeMaker; use lib 'inc'; use MyMakeMakerExtras; MyMakeMakerExtras::WriteMakefile (NAME => 'Pod-MinimumVersion', ABSTRACT => 'Determine minimum Perl version of POD directives.', VERSION_FROM => 'lib/Pod/MinimumVersion.pm', AUTHOR => 'Kevin Ryde ', LICENSE => 'gpl', SIGN => 1, EXE_FILES => [ 'pod-minimumversion' ], PREREQ_PM => { # 1.02 for avoiding leaks in perl 5.8, probably # something newer has more merit though 'IO::String' => '1.02', 'List::Util' => 0, 'Pod::Parser' => 0, 'version' => 0, # only for testing ... 'Test' => 0, }, # but Pod::Parser, IO::String and version.pm are all 5.005 though ... MIN_PERL_VERSION => '5.004', META_MERGE => { resources => { homepage => 'http://user42.tuxfamily.org/pod-minimumversion/index.html', }, optional_features => { # maximum_tests => # { description => 'Have "make test" do as much as possible.', # requires => { # Test::Weaken 2.002 for "ignore" # 'Test::Weaken' => '2.002', # }, # }, maximum_devel => { description => 'Stuff used variously for development.', requires => { 'Smart::Comments' => 0, }, }, }, }, ); Pod-MinimumVersion-50/META.yml0000644000175000017500000000273711545420710014036 0ustar gggg--- #YAML:1.0 name: Pod-MinimumVersion version: 50 abstract: Determine minimum Perl version of POD directives. author: - Kevin Ryde license: gpl distribution_type: module configure_requires: ExtUtils::MakeMaker: 0 build_requires: ExtUtils::MakeMaker: 0 requires: IO::String: 1.02 List::Util: 0 perl: 5.004 Pod::Parser: 0 Test: 0 version: 0 resources: homepage: http://user42.tuxfamily.org/pod-minimumversion/index.html license: http://www.gnu.org/licenses/gpl.html no_index: directory: - t - inc - devel generated_by: ExtUtils::MakeMaker version 6.55_02 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 optional_features: maximum_devel: description: Stuff used variously for development. requires: Pod::Simple::HTML: 0 Smart::Comments: 0 warnings::unused: 0 maximum_tests: description: Have "make test" do as much as possible. requires: File::Spec: 0 Parse::CPAN::Meta: 0 Test::DistManifest: 0 Test::Pod: 1.00 Test::Synopsis: 0 Test::YAML::Meta: 0.15 YAML: 0 YAML::Syck: 0 YAML::Tiny: 0 YAML::XS: 0