Test-Synopsis-0.18 000755 001750 001750 0 15225153025 14203 5 ustar 00zoffix zoffix 000000 000000 README 100644 001750 001750 553 15225153025 15127 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18 This archive contains the distribution Test-Synopsis,
version 0.18:
Test your SYNOPSIS code
This software is copyright (c) 2026 by Tatsuhiko Miyagawa.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
This README file was generated by Dist::Zilla::Plugin::Readme v6.037.
Changes 100644 001750 001750 7624 15225153025 15570 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18 Revision history for Perl extension Test::Synopsis
0.18 2026-07-13
- Fixed #20: =for test_synopsis directives are now applied
regardless of their position relative to the SYNOPSIS code
block (regression since 0.14)
0.17 2021-12-08
- Mention related module in docs (#22)
0.16 2019-05-24
- Fix test failures when version 0.23 of
Test::Spelling is in use (by ppisar, #21)
0.15 2016-03-02
- Specify Pod::Simple version to prereq, as needed
feature missing from older versions (by autarch)
0.14 2016-02-16
- Complete rewrite by dolmen
[BREAKING CHANGES]
- The undocumented PRIVATE subroutine extract_synopsis
has been renamed. Any code using it will break
0.13 2016-01-04
- Fix #12 conflict with multiple chunks (by turnstep)
0.12 2015-12-27
- Add META.json (monsieurp)
0.11 2014-10-04
[Changes by ZOFFIX]
- Added #10 to CAVEATS (redefined warnings)
- Fixed #11 (failing tests on newer perls)
0.10 2014-02-07
[Changes by ZOFFIX]
- Reverted the change of renaming extract_synopsis() to
_extract_synopsis(), as it appears some distros have used
undocumented extract_synopsis() in their user tests, and
the change is causing their distros to fail
- Added contributors into META file through dzil plugin
0.09 2014-02-06
[Changes by ZOFFIX]
- Fixed prereqs to allow earlier versions of Test-Simple (Issue #9)
- Removed POD errors from test .pm's to increase Kwalitee
0.08 2014-02-05
[Changes by ZOFFIX]
- Implemented proper handling of __DATA__ tokens
- Removed unwanted warnings issued during tests
- Upped required Test-Simple distro version (Fixes Issue #9)
- Minor pod fixes
0.07 2014-02-04
[Changes by ZOFFIX]
- Converted to dzil for automation of everything and
auto-generation of all the author/release tests and extra files
- Fixed RT#84863 (should ignore descriptions, and
other text that is not code)
https://rt.cpan.org/Ticket/Display.html?id=84863
- Fixed RT#76856 (Sandbox breaks when combining synopses that use
Moose and Moose::Role)
https://rt.cpan.org/Ticket/Display.html?id=76856
- Fixed RT#69438 (heredocs fail to terminate because of the
leading space for verbatim blocks)
https://rt.cpan.org/Ticket/Display.html?id=69438
- Fixed RT#54731 (suggest =for conditionalized synopsis check)
https://rt.cpan.org/Ticket/Display.html?id=54731
- Fixed RT#53192 (missing Copyright information for Test::Synopsis)
https://rt.cpan.org/Ticket/Display.html?id=53192
- Fixed RT#52684 (pod directive to skip Test::Synopsis)
https://rt.cpan.org/Ticket/Display.html?id=52684
- Fixed RT#51534 (end =for at blank line)
https://rt.cpan.org/Ticket/Display.html?id=51534
- Fixed RT#51535 (show failing code on error)
https://rt.cpan.org/Ticket/Display.html?id=51535
0.06 2009-06-06 11:07:50 PDT 2009
- Reworked NoPod tests so it doesn't sit in lib/ and won't be installed.
0.05 2009-06-06 10:55:02 PDT 2009
- use Test::Builder::Module to support forward compatibilities with Test::More
- Don't warn in tr/// if there is no pod at all. (Thanks to hanekomu)
0.04 2009-03-05 17:19:13 PST 2009
- Fixed a doc bug where all_synopsis_ok() is taking a directory which it doesn't.
0.03 2009-02-25 20:48:54 PST 2009
- Added file name and line number to eval context
(Thanks to Daisuke Maki and Goro Fuji)
0.02 2009-02-24 12:22:03 PST
- Added more docs.
- eval the code in a more separate sandbox so that variables in Test::Synopsis won't affect.
0.01 2009-02-24 00:21:02 PST
- original version
LICENSE 100644 001750 001750 46323 15225153025 15321 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18 This software is copyright (c) 2026 by Tatsuhiko Miyagawa.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
Terms of the Perl programming language system itself
a) the GNU General Public License as published by the Free
Software Foundation; either version 1, or (at your option) any
later version, or
b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
This software is Copyright (c) 2026 by Tatsuhiko Miyagawa.
This is free software, licensed under:
The GNU General Public License, Version 1, February 1989
GNU GENERAL PUBLIC LICENSE
Version 1, February 1989
Copyright (C) 1989 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 license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
software, 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 make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of a such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must tell them their rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License. The
"Program", below, refers to any such program or work, and a "work based
on the Program" means either the Program or any work containing the
Program or a portion of it, either verbatim or with modifications. Each
licensee is addressed as "you".
1. You may copy and distribute 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 and
disclaimer of warranty; keep intact all the notices that refer to this
General Public License and to the absence of any warranty; and give any
other recipients of the Program a copy of this General Public License
along with the Program. You may charge a fee for the physical act of
transferring a copy.
2. You may modify your copy or copies of the Program or any portion of
it, and copy and distribute such modifications under the terms of Paragraph
1 above, provided that you also do the following:
a) cause the modified files to carry prominent notices stating that
you changed the files and the date of any change; and
b) cause the whole of any work that you distribute or publish, that
in whole or in part contains the Program or any part thereof, either
with or without modifications, to be licensed at no charge to all
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.
d) You may charge a fee for the physical act of transferring a
copy, and you may at your option offer warranty protection in
exchange for a fee.
Mere aggregation of another independent work with the Program (or its
derivative) on a volume of a storage or distribution medium does not bring
the other work under the scope of these terms.
3. You may copy and distribute the Program (or a portion or derivative of
it, under Paragraph 2) in object code or executable form under the terms of
Paragraphs 1 and 2 above provided that you also do one of the following:
a) accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of
Paragraphs 1 and 2 above; or,
b) accompany it with a written offer, valid for at least three
years, to give any third party free (except for a nominal charge
for the cost of distribution) a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of
Paragraphs 1 and 2 above; or,
c) accompany it with the information you received as to where the
corresponding source code may be obtained. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form alone.)
Source code for a work means the preferred form of the work for making
modifications to it. For an executable file, complete source code means
all the source code for all modules it contains; but, as a special
exception, it need not include source code for modules which are standard
libraries that accompany the operating system on which the executable
file runs, or for standard header files or definitions files that
accompany that operating system.
4. You may not copy, modify, sublicense, distribute or transfer the
Program except as expressly provided under this General Public License.
Any attempt otherwise to copy, modify, sublicense, distribute or transfer
the Program is void, and will automatically terminate your rights to use
the Program under this License. However, parties who have received
copies, or rights to use copies, from you under this General Public
License will not have their licenses terminated so long as such parties
remain in full compliance.
5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these
terms and conditions. You may not impose any further restrictions on the
recipients' exercise of the rights granted herein.
7. The Free Software Foundation may publish revised and/or new versions
of the 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 a version number of the license which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.
8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE 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.
END OF TERMS AND CONDITIONS
Appendix: 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 humanity, 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 convey
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) 19yy
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 1, 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 is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision 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, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
program `Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker.
, 1 April 1989
Moe Ghoul, President of Vice
That's all there is to it!
--- The Perl Artistic License 1.0 ---
This software is Copyright (c) 2026 by Tatsuhiko Miyagawa.
This is free software, licensed under:
The Perl Artistic License 1.0
The "Artistic License"
Preamble
The intent of this document is to state the conditions under which a
Package may be copied, such that the Copyright Holder maintains some
semblance of artistic control over the development of the package,
while giving the users of the package the right to use and distribute
the Package in a more-or-less customary fashion, plus the right to make
reasonable modifications.
Definitions:
"Package" refers to the collection of files distributed by the
Copyright Holder, and derivatives of that collection of files
created through textual modification.
"Standard Version" refers to such a Package if it has not been
modified, or has been modified in accordance with the wishes
of the Copyright Holder as specified below.
"Copyright Holder" is whoever is named in the copyright or
copyrights for the package.
"You" is you, if you're thinking about copying or distributing
this Package.
"Reasonable copying fee" is whatever you can justify on the
basis of media cost, duplication charges, time of people involved,
and so on. (You will not be required to justify it to the
Copyright Holder, but only to the computing community at large
as a market that must bear the fee.)
"Freely Available" means that no fee is charged for the item
itself, though there may be fees involved in handling the item.
It also means that recipients of the item may redistribute it
under the same conditions they received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder. A Package
modified in such a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided
that you insert a prominent notice in each changed file stating how and
when you changed that file, and provided that you do at least ONE of the
following:
a) place your modifications in the Public Domain or otherwise make them
Freely Available, such as by posting said modifications to Usenet or
an equivalent medium, or placing the modifications on a major archive
site such as uunet.uu.net, or by allowing the Copyright Holder to include
your modifications in the Standard Version of the Package.
b) use the modified Package only within your corporation or organization.
c) rename any non-standard executables so the names do not conflict
with standard executables, which must also be provided, and provide
a separate manual page for each non-standard executable that clearly
documents how it differs from the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
4. You may distribute the programs of this Package in object code or
executable form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where
to get the Standard Version.
b) accompany the distribution with the machine-readable source of
the Package with your modifications.
c) give non-standard executables non-standard names, and clearly
document the differences in manual pages (or equivalent), together
with instructions on where to get the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this
Package. You may not charge a fee for this Package itself. However,
you may distribute this Package in aggregate with other (possibly
commercial) programs as part of a larger (possibly commercial) software
distribution provided that you do not advertise this Package as a
product of your own. You may embed this Package's interpreter within
an executable of yours (by linking); this shall be construed as a mere
form of aggregation, provided that the complete Standard Version of the
interpreter is so embedded.
6. The scripts and library files supplied as input to or produced as
output from the programs of this Package do not automatically fall
under the copyright of this Package, but belong to whoever generated
them, and may be sold commercially, and may be aggregated with this
Package. If such scripts or library files are aggregated with this
Package via the so-called "undump" or "unexec" methods of producing a
binary executable image, then distribution of such an image shall
neither be construed as a distribution of this Package nor shall it
fall under the restrictions of Paragraphs 3 and 4, provided that you do
not represent such an executable image as a Standard Version of this
Package.
7. C subroutines (or comparably compiled subroutines in other
languages) supplied by you and linked into this Package in order to
emulate subroutines and variables of the language defined by this
Package shall not be considered part of this Package, but are the
equivalent of input as in Paragraph 6, provided these subroutines do
not change the language in any way that would cause it to fail the
regression tests for the language.
8. Aggregation of this Package with a commercial distribution is always
permitted provided that the use of this Package is embedded; that is,
when no overt attempt is made to make this Package's interfaces visible
to the end user of the commercial distribution. Such use shall not be
construed as a distribution of this Package.
9. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.
10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End
INSTALL 100644 001750 001750 4562 15225153025 15324 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18 This is the Perl distribution Test-Synopsis.
Installing Test-Synopsis is straightforward.
## Installation with cpanm
If you have cpanm, you only need one line:
% cpanm Test::Synopsis
If it does not have permission to install modules to the current perl, cpanm
will automatically set up and install to a local::lib in your home directory.
See the local::lib documentation (https://metacpan.org/pod/local::lib) for
details on enabling it in your environment.
## Installing with the CPAN shell
Alternatively, if your CPAN shell is set up, you should just be able to do:
% cpan Test::Synopsis
## Manual installation
As a last resort, you can manually install it. If you have not already
downloaded the release tarball, you can find the download link on the module's
MetaCPAN page: https://metacpan.org/pod/Test::Synopsis
Untar the tarball, install configure prerequisites (see below), then build it:
% perl Makefile.PL
% make && make test
Then install it:
% make install
On Windows platforms, you should use `dmake` or `nmake`, instead of `make`.
If your perl is system-managed, you can create a local::lib in your home
directory to install modules to. For details, see the local::lib documentation:
https://metacpan.org/pod/local::lib
The prerequisites of this distribution will also have to be installed manually. The
prerequisites are listed in one of the files: `MYMETA.yml` or `MYMETA.json` generated
by running the manual build process described above.
## Configure Prerequisites
This distribution requires other modules to be installed before this
distribution's installer can be run. They can be found under the
"configure_requires" key of META.yml or the
"{prereqs}{configure}{requires}" key of META.json.
## Other Prerequisites
This distribution may require additional modules to be installed after running
Makefile.PL.
Look for prerequisites in the following phases:
* to run make, PHASE = build
* to use the module code itself, PHASE = runtime
* to run tests, PHASE = test
They can all be found in the "PHASE_requires" key of MYMETA.yml or the
"{prereqs}{PHASE}{requires}" key of MYMETA.json.
## Documentation
Test-Synopsis documentation is available as POD.
You can run `perldoc` from a shell to read the documentation:
% perldoc Test::Synopsis
For more information on installing Perl modules via CPAN, please see:
https://www.cpan.org/modules/INSTALL.html
dist.ini 100644 001750 001750 2323 15225153025 15730 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18 name = Test-Synopsis
author = Tatsuhiko Miyagawa
license = Perl_5
copyright_holder = Tatsuhiko Miyagawa
[@Author::ZOFFIX]
-remove = AutoMetaResources
-remove = Test::Pod::LinkCheck ; Failing for a strange reason (firewalled?)
-remove = Test::UnusedVars ; reporting false positives
-remove = Git::NextVersion
-remove = Git::Tag
-remove = Git::Check
-remove = Git::Commit
-remove = Git::Push
[Prereqs / TestRequires]
Test::Builder = 0.34
[Prereqs / DevelopRequires]
Pod::Wordlist = 1.06
Test::More = 0.96
[AutoMetaResources]
bugtracker.github = user:miyagawa
repository.github = user:miyagawa
homepage = http://metacpan.org/release/%{dist}
[Meta::Contributors]
contributor = Dave Rolsky
contributor = Kevin Ryde
contributor = Marcel Grünauer
contributor = Mike Doherty
contributor = Patrice Clement
contributor = Greg Sabino Mullane
contributor = Zoffix Znet
contributor = Olivier Mengué
[Git::NextVersion]
first_version = 0.07
version_regexp = ^(.+)$
[Git::Tag]
tag_format = %v
tag_message = %v
[Git::Check]
[Git::Commit]
[Git::Push]
[MetaJSON]
META.yml 100644 001750 001750 33567 15225153025 15573 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18 ---
abstract: 'Test your SYNOPSIS code'
author:
- 'Tatsuhiko Miyagawa '
build_requires:
File::Spec: '0'
IO::Handle: '0'
IPC::Open3: '0'
Test::Builder: '0.34'
Test::Builder::Tester: '0'
Test::More: '0'
perl: 5.008_001
configure_requires:
ExtUtils::MakeMaker: '0'
perl: 5.008_001
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.037, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Test-Synopsis
provides:
Test::Synopsis:
file: lib/Test/Synopsis.pm
version: '0.18'
requires:
ExtUtils::Manifest: '0'
Pod::Simple: '3.09'
Test::Builder::Module: '0'
parent: '0'
perl: 5.008_001
strict: '0'
warnings: '0'
resources:
bugtracker: https://github.com/miyagawa/test-synopsis/issues
homepage: http://metacpan.org/release/Test-Synopsis
repository: git://github.com/miyagawa/test-synopsis.git
version: '0.18'
x_Dist_Zilla:
perl:
version: '5.042002'
plugins:
-
class: Dist::Zilla::Plugin::OurPkgVersion
name: '@Author::ZOFFIX/OurPkgVersion'
version: '0.21'
-
class: Dist::Zilla::Plugin::Pod::Spiffy
name: '@Author::ZOFFIX/Pod::Spiffy'
version: '1.001007'
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
Dist::Zilla::Plugin::PromptIfStale:
check_all_plugins: 1
check_all_prereqs: 1
modules: []
phase: release
run_under_travis: 0
skip:
- ExtUtils::MakeMaker
- File::Copy
- IPC::Open3
- base
- strict
- warnings
name: '@Author::ZOFFIX/PromptIfStale'
version: '0.060'
-
class: Dist::Zilla::Plugin::GatherDir
config:
Dist::Zilla::Plugin::GatherDir:
exclude_filename: []
exclude_match: []
follow_symlinks: 0
include_dotfiles: 0
prefix: ''
prune_directory: []
root: .
name: '@Author::ZOFFIX/GatherDir'
version: '6.037'
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@Author::ZOFFIX/PruneCruft'
version: '6.037'
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@Author::ZOFFIX/ManifestSkip'
version: '6.037'
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@Author::ZOFFIX/MetaYAML'
version: '6.037'
-
class: Dist::Zilla::Plugin::License
name: '@Author::ZOFFIX/License'
version: '6.037'
-
class: Dist::Zilla::Plugin::Readme
name: '@Author::ZOFFIX/Readme'
version: '6.037'
-
class: Dist::Zilla::Plugin::ExecDir
name: '@Author::ZOFFIX/ExecDir'
version: '6.037'
-
class: Dist::Zilla::Plugin::ShareDir
name: '@Author::ZOFFIX/ShareDir'
version: '6.037'
-
class: Dist::Zilla::Plugin::MakeMaker
config:
Dist::Zilla::Role::TestRunner:
default_jobs: 1
name: '@Author::ZOFFIX/MakeMaker'
version: '6.037'
-
class: Dist::Zilla::Plugin::Manifest
name: '@Author::ZOFFIX/Manifest'
version: '6.037'
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@Author::ZOFFIX/AutoPrereqs'
version: '6.037'
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@Author::ZOFFIX/MetaConfig'
version: '6.037'
-
class: Dist::Zilla::Plugin::Prereqs::AuthorDeps
name: '@Author::ZOFFIX/Prereqs::AuthorDeps'
version: '0.007'
-
class: Dist::Zilla::Plugin::MinimumPerl
name: '@Author::ZOFFIX/MinimumPerl'
version: '1.006'
-
class: Dist::Zilla::Plugin::MetaProvides::Package
config:
Dist::Zilla::Plugin::MetaProvides::Package:
finder_objects:
-
class: Dist::Zilla::Plugin::FinderCode
name: '@Author::ZOFFIX/MetaProvides::Package/AUTOVIV/:InstallModulesPM'
version: '6.037'
include_underscores: 0
Dist::Zilla::Role::MetaProvider::Provider:
$Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002004'
inherit_missing: 1
inherit_version: 1
meta_noindex: 1
Dist::Zilla::Role::ModuleMetadata:
Module::Metadata: '1.000038'
version: '0.006'
name: '@Author::ZOFFIX/MetaProvides::Package'
version: '2.004003'
-
class: Dist::Zilla::Plugin::InstallGuide
config:
Dist::Zilla::Role::ModuleMetadata:
Module::Metadata: '1.000038'
version: '0.006'
name: '@Author::ZOFFIX/InstallGuide'
version: '1.200014'
-
class: Dist::Zilla::Plugin::ReadmeAnyFromPod
config:
Dist::Zilla::Role::FileWatcher:
version: '0.006'
name: '@Author::ZOFFIX/ReadmeAnyFromPod'
version: '0.163250'
-
class: Dist::Zilla::Plugin::Test::Compile
config:
Dist::Zilla::Plugin::Test::Compile:
bail_out_on_fail: 0
fail_on_warning: author
fake_home: 0
filename: t/00-compile.t
module_finder:
- ':InstallModules'
needs_display: 0
phase: test
script_finder:
- ':PerlExecFiles'
skips: []
switch: []
name: '@Author::ZOFFIX/Test::Compile'
version: '2.059'
-
class: Dist::Zilla::Plugin::Test::DistManifest
name: '@Author::ZOFFIX/Test::DistManifest'
version: '2.000006'
-
class: Dist::Zilla::Plugin::Test::EOL
config:
Dist::Zilla::Plugin::Test::EOL:
filename: xt/author/eol.t
finder:
- ':ExecFiles'
- ':InstallModules'
- ':TestFiles'
trailing_whitespace: 1
name: '@Author::ZOFFIX/Test::EOL'
version: '0.19'
-
class: Dist::Zilla::Plugin::Test::Version
name: '@Author::ZOFFIX/Test::Version'
version: '1.09'
-
class: Dist::Zilla::Plugin::Test::Kwalitee
config:
Dist::Zilla::Plugin::Test::Kwalitee:
filename: xt/release/kwalitee.t
skiptest: []
name: '@Author::ZOFFIX/Test::Kwalitee'
version: '2.13'
-
class: Dist::Zilla::Plugin::MetaTests
name: '@Author::ZOFFIX/MetaTests'
version: '6.037'
-
class: Dist::Zilla::Plugin::Test::CPAN::Meta::JSON
name: '@Author::ZOFFIX/Test::CPAN::Meta::JSON'
version: '0.004'
-
class: Dist::Zilla::Plugin::MojibakeTests
name: '@Author::ZOFFIX/MojibakeTests'
version: '0.8'
-
class: Dist::Zilla::Plugin::Test::NoTabs
config:
Dist::Zilla::Plugin::Test::NoTabs:
filename: xt/author/no-tabs.t
finder:
- ':InstallModules'
- ':ExecFiles'
- ':TestFiles'
name: '@Author::ZOFFIX/Test::NoTabs'
version: '0.15'
-
class: Dist::Zilla::Plugin::PodCoverageTests
name: '@Author::ZOFFIX/PodCoverageTests'
version: '6.037'
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@Author::ZOFFIX/PodSyntaxTests'
version: '6.037'
-
class: Dist::Zilla::Plugin::Test::Portability
config:
Dist::Zilla::Plugin::Test::Portability:
options: ''
name: '@Author::ZOFFIX/Test::Portability'
version: '2.001003'
-
class: Dist::Zilla::Plugin::Test::Synopsis
name: '@Author::ZOFFIX/Test::Synopsis'
version: '2.000007'
-
class: Dist::Zilla::Plugin::Test::CPAN::Changes
config:
Dist::Zilla::Plugin::Test::CPAN::Changes:
changelog: Changes
filename: xt/release/cpan-changes.t
name: '@Author::ZOFFIX/Test::CPAN::Changes'
version: '0.013'
-
class: Dist::Zilla::Plugin::Test::PodSpelling
config:
Dist::Zilla::Plugin::Test::PodSpelling:
directories:
- bin
- lib
spell_cmd: ''
stopwords: []
wordlist: Pod::Wordlist
name: '@Author::ZOFFIX/Test::PodSpelling'
version: '2.007006'
-
class: Dist::Zilla::Plugin::CheckSelfDependency
config:
Dist::Zilla::Plugin::CheckSelfDependency:
finder:
- ':InstallModules'
Dist::Zilla::Role::ModuleMetadata:
Module::Metadata: '1.000038'
version: '0.006'
name: '@Author::ZOFFIX/CheckSelfDependency'
version: '0.011'
-
class: Dist::Zilla::Plugin::CheckPrereqsIndexed
name: '@Author::ZOFFIX/CheckPrereqsIndexed'
version: '0.022'
-
class: Dist::Zilla::Plugin::Test::MinimumVersion
config:
Dist::Zilla::Plugin::Test::MinimumVersion:
max_target_perl: '5.008008'
name: '@Author::ZOFFIX/Test::MinimumVersion'
version: '2.000011'
-
class: Dist::Zilla::Plugin::CopyFilesFromRelease
config:
Dist::Zilla::Plugin::CopyFilesFromRelease:
filename:
- README.md
match: []
name: '@Author::ZOFFIX/CopyFilesFromRelease'
version: '0.007'
-
class: Dist::Zilla::Plugin::TestRelease
name: '@Author::ZOFFIX/TestRelease'
version: '6.037'
-
class: Dist::Zilla::Plugin::InstallRelease
name: '@Author::ZOFFIX/InstallRelease'
version: '0.008'
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@Author::ZOFFIX/ConfirmRelease'
version: '6.037'
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@Author::ZOFFIX/UploadToCPAN'
version: '6.037'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: test
type: requires
name: TestRequires
version: '6.037'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: develop
type: requires
name: DevelopRequires
version: '6.037'
-
class: Dist::Zilla::Plugin::AutoMetaResources
name: AutoMetaResources
version: '1.21'
-
class: Dist::Zilla::Plugin::Meta::Contributors
name: Meta::Contributors
version: '0.003'
-
class: Dist::Zilla::Plugin::Git::NextVersion
config:
Dist::Zilla::Plugin::Git::NextVersion:
first_version: '0.07'
version_by_branch: 0
version_regexp: (?^u:^(.+)$)
Dist::Zilla::Role::Git::Repo:
git_version: 2.43.0
repo_root: .
name: Git::NextVersion
version: '2.052'
-
class: Dist::Zilla::Plugin::Git::Tag
config:
Dist::Zilla::Plugin::Git::Tag:
branch: ~
changelog: Changes
signed: 0
tag: '0.18'
tag_format: '%v'
tag_message: '%v'
Dist::Zilla::Role::Git::Repo:
git_version: 2.43.0
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: Git::Tag
version: '2.052'
-
class: Dist::Zilla::Plugin::Git::Check
config:
Dist::Zilla::Plugin::Git::Check:
untracked_files: die
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty:
- Changes
- dist.ini
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: 2.43.0
repo_root: .
name: Git::Check
version: '2.052'
-
class: Dist::Zilla::Plugin::Git::Commit
config:
Dist::Zilla::Plugin::Git::Commit:
add_files_in: []
commit_msg: v%V%n%n%c
signoff: 0
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty:
- Changes
- dist.ini
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: 2.43.0
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: Git::Commit
version: '2.052'
-
class: Dist::Zilla::Plugin::Git::Push
config:
Dist::Zilla::Plugin::Git::Push:
push_to:
- origin
remotes_must_exist: 1
Dist::Zilla::Role::Git::Repo:
git_version: 2.43.0
repo_root: .
name: Git::Push
version: '2.052'
-
class: Dist::Zilla::Plugin::MetaJSON
name: MetaJSON
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExtraTestFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':PerlExecFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':AllFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':NoFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: '@Author::ZOFFIX/MetaProvides::Package/AUTOVIV/:InstallModulesPM'
version: '6.037'
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: 0
version: '6.037'
x_contributors:
- 'Dave Rolsky '
- 'Kevin Ryde '
- 'Marcel Grünauer '
- 'Mike Doherty '
- 'Patrice Clement '
- 'Greg Sabino Mullane '
- 'Zoffix Znet '
- 'Olivier Mengué '
x_generated_by_perl: v5.42.2
x_serialization_backend: 'YAML::Tiny version 1.76'
x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
MANIFEST 100644 001750 001750 2270 15225153025 15416 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.037
Changes
INSTALL
LICENSE
MANIFEST
META.json
META.yml
Makefile.PL
README
README.md
dist.ini
lib/Test/Synopsis.pm
t/00-compile.t
t/01-fail-if-SYNOPSIS-has-errors.t
t/02-END-token-errors.t
t/03-end-in-pod.t
t/04-HEREDOC.t
t/05-multi-chunks-clash.t
t/05-multi-files-clash.t
t/06-for.t
t/07-nopod.t
t/08-plain-text-in-pod.t
t/09-synopsis.t
t/10-in-pod-skip.t
t/11-DATA-in-pod.t
t/12-DATA-token-errors.t
t/13-for-location.t
t/lib/BrokenSYNOPSIS01.pm
t/lib/ENDInPod.pm
t/lib/ENDInPodWithError.pm
t/lib/NoPod.pm
t/lib/PlainTextInPod.pm
t/lib/Test03.pm
t/lib/Test03Other.pm
t/lib/Test04HEREDOC.pm
t/lib/Test10HEREDOC.pm
t/lib/Test10InPodSkipWithBegin.pm
t/lib/Test11DATAInPod.pm
t/lib/Test12DATAInPodWithError.pm
t/lib/TestForAfterCode.pm
t/lib/TestForBeforeCode.pm
t/lib/TestMultipleChunks.pm
xt/author/distmeta.t
xt/author/eol.t
xt/author/minimum-version.t
xt/author/mojibake.t
xt/author/no-tabs.t
xt/author/pod-coverage.t
xt/author/pod-spell.t
xt/author/pod-syntax.t
xt/author/portability.t
xt/author/synopsis.t
xt/author/test-version.t
xt/release/cpan-changes.t
xt/release/dist-manifest.t
xt/release/kwalitee.t
xt/release/meta-json.t
README.md 100644 001750 001750 14160 15225153025 15565 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18 # NAME
Test::Synopsis - Test your SYNOPSIS code
# SYNOPSIS
# xt/synopsis.t (with Module::Install::AuthorTests)
use Test::Synopsis;
all_synopsis_ok();
# Or, run safe without Test::Synopsis
use Test::More;
eval "use Test::Synopsis";
plan skip_all => "Test::Synopsis required for testing" if $@;
all_synopsis_ok();
# DESCRIPTION
Test::Synopsis is an (author) test module to find .pm or .pod files
under your _lib_ directory and then make sure the example snippet
code in your _SYNOPSIS_ section passes the perl compile check.
Note that this module only checks the perl syntax (by wrapping the
code with `sub`) and doesn't actually run the code, **UNLESS**
that code is a `BEGIN {}` block or a `use` statement.
Suppose you have the following POD in your module.
=head1 NAME
Awesome::Template - My awesome template
=head1 SYNOPSIS
use Awesome::Template;
my $template = Awesome::Template->new;
$tempalte->render("template.at");
=head1 DESCRIPTION
An user of your module would try copy-paste this synopsis code and
find that this code doesn't compile because there's a typo in your
variable name _$tempalte_. Test::Synopsis will catch that error
before you ship it.
# VARIABLE DECLARATIONS
Sometimes you might want to put some undeclared variables in your
synopsis, like:
=head1 SYNOPSIS
use Data::Dumper::Names;
print Dumper($scalar, \@array, \%hash);
This assumes these variables like _$scalar_ are defined elsewhere in
module user's code, but Test::Synopsis, by default, will complain that
these variables are not declared:
Global symbol "$scalar" requires explicit package name at ...
In this case, you can add the following POD sequence elsewhere in your POD:
=for test_synopsis
no strict 'vars'
Or more explicitly,
=for test_synopsis
my($scalar, @array, %hash);
Test::Synopsis will find these `=for` blocks and these statements are
prepended before your SYNOPSIS code when being evaluated, so those
variable name errors will go away, without adding unnecessary bits in
SYNOPSIS which might confuse users.
# SKIPPING TEST FROM INSIDE THE POD
You can use a `BEGIN{}` block in the `=for test_synopsis` to check for
specific conditions (e.g. if a module is present), and possibly skip
the test.
If you `die()` inside the `BEGIN{}` block and the die message begins
with sequence `SKIP:` (note the colon at the end), the test
will be skipped for that document.
=head1 SYNOPSIS
=for test_synopsis BEGIN { die "SKIP: skip this pod, it's horrible!\n"; }
$x; # undeclared variable, but we skipped the test!
=end
# EXPORTED SUBROUTINES
## `all_synopsis_ok`
all_synopsis_ok();
all_synopsis_ok( dump_all_code_on_error => 1 );
Checks the SYNOPSIS code in all your modules. Takes **optional**
arguments as key/value pairs. Possible arguments are as follows:
### `dump_all_code_on_error`
all_synopsis_ok( dump_all_code_on_error => 1 );
Takes true or false values as a value. **Defaults to:** false. When
set to a true value, if an error is discovered in the SYNOPSIS code,
the test will dump the entire snippet of code it tried to test. Use this
if you want to copy/paste and play around with the code until the error
is fixed.
The dumped code will include any of the `=for` code you specified (see
["VARIABLE DECLARATIONS"](#variable-declarations) section above) as well as a few internal bits
this test module uses to make SYNOPSIS code checking possible.
**Note:** you will likely have to remove the `#` and a space at the start
of each line (`perl -pi -e 's/^#\s//;' TEMP_FILE_WITH_CODE`)
## `synopsis_ok`
use Test::More tests => 1;
use Test::Synopsis;
synopsis_ok("t/lib/NoPod.pm");
synopsis_ok(qw/Pod1.pm Pod2.pm Pod3.pm/);
Lets you test a single file. **Note:** you must setup your own plan if
you use this subroutine (e.g. with `use Test::More tests => 1;`).
**Takes** a list of filenames for documents containing SYNOPSIS code to test.
# CAVEATS
This module will not check code past the `__END__` or
`__DATA__` tokens, if one is
present in the SYNOPSIS code.
This module will actually execute `use` statements and any code
you specify in the `BEGIN {}` blocks in the SYNOPSIS.
If you're using HEREDOCs in your SYNOPSIS, you will need to place
the ending of the HEREDOC at the same indent as the
first line of the code of your SYNOPSIS.
Redefinition warnings can be turned off with
=for test_synopsis
no warnings 'redefine';
# REPOSITORY
Fork this module on GitHub:
[https://github.com/miyagawa/Test-Synopsis](https://github.com/miyagawa/Test-Synopsis)
# BUGS
To report bugs or request features, please use
[https://github.com/miyagawa/Test-Synopsis/issues](https://github.com/miyagawa/Test-Synopsis/issues)
If you can't access GitHub, you can email your request
to `bug-Test-Synopsis at rt.cpan.org`
# AUTHOR
Tatsuhiko Miyagawa
Goro Fuji blogged about the original idea at
[http://d.hatena.ne.jp/gfx/20090224/1235449381](http://d.hatena.ne.jp/gfx/20090224/1235449381) based on the testing
code taken from [Test::Weaken](https://metacpan.org/pod/Test%3A%3AWeaken).
# MAINTAINER
Zoffix Znet <cpan (at) zoffix.com>
# CONTRIBUTORS
- Dave Rolsky ([DROLSKY](https://metacpan.org/author/DROLSKY))
- Kevin Ryde ([KRYDE](https://metacpan.org/author/KRYDE))
- Marcel Grünauer ([MARCEL](https://metacpan.org/author/MARCEL))
- Mike Doherty ([DOHERTY](https://metacpan.org/author/DOHERTY))
- Patrice Clement ([monsieurp](https://github.com/monsieurp))
- Greg Sabino Mullane ([TURNSTEP](https://metacpan.org/author/TURNSTEP))
- Zoffix Znet ([ZOFFIX](https://metacpan.org/author/ZOFFIX))
- Olivier Mengué ([DOLMEN](https://metacpan.org/author/DOLMEN))
# LICENSE
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
# COPYRIGHT
This library is Copyright (c) Tatsuhiko Miyagawa
# SEE ALSO
[Test::Pod](https://metacpan.org/pod/Test%3A%3APod), [Test::UseAllModules](https://metacpan.org/pod/Test%3A%3AUseAllModules), [Test::Inline](https://metacpan.org/pod/Test%3A%3AInline), [Test::Synopsis::Expectation](https://metacpan.org/pod/Test%3A%3ASynopsis%3A%3AExpectation)
META.json 100644 001750 001750 54644 15225153025 15742 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18 {
"abstract" : "Test your SYNOPSIS code",
"author" : [
"Tatsuhiko Miyagawa "
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 6.037, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : 2
},
"name" : "Test-Synopsis",
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0",
"perl" : "5.008_001"
}
},
"develop" : {
"requires" : {
"Dist::Zilla" : "5",
"Dist::Zilla::Plugin::AutoMetaResources" : "0",
"Dist::Zilla::Plugin::Git::Check" : "0",
"Dist::Zilla::Plugin::Git::Commit" : "0",
"Dist::Zilla::Plugin::Git::NextVersion" : "0",
"Dist::Zilla::Plugin::Git::Push" : "0",
"Dist::Zilla::Plugin::Git::Tag" : "0",
"Dist::Zilla::Plugin::Meta::Contributors" : "0",
"Dist::Zilla::Plugin::MetaJSON" : "0",
"Dist::Zilla::Plugin::Prereqs" : "0",
"Dist::Zilla::PluginBundle::Author::ZOFFIX" : "0",
"Pod::Coverage::TrustPod" : "0",
"Pod::Wordlist" : "1.06",
"Software::License::Perl_5" : "0",
"Test::CPAN::Changes" : "0.19",
"Test::CPAN::Meta" : "0",
"Test::CPAN::Meta::JSON" : "0.16",
"Test::DistManifest" : "0",
"Test::EOL" : "0",
"Test::Kwalitee" : "1.21",
"Test::MinimumVersion" : "0",
"Test::Mojibake" : "0",
"Test::More" : "0.96",
"Test::NoTabs" : "0",
"Test::Pod" : "1.41",
"Test::Pod::Coverage" : "1.08",
"Test::Portability::Files" : "0",
"Test::Spelling" : "0.17",
"Test::Synopsis" : "0",
"Test::Version" : "1"
}
},
"runtime" : {
"requires" : {
"ExtUtils::Manifest" : "0",
"Pod::Simple" : "3.09",
"Test::Builder::Module" : "0",
"parent" : "0",
"perl" : "5.008_001",
"strict" : "0",
"warnings" : "0"
}
},
"test" : {
"requires" : {
"File::Spec" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
"Test::Builder" : "0.34",
"Test::Builder::Tester" : "0",
"Test::More" : "0",
"perl" : "5.008_001"
}
}
},
"provides" : {
"Test::Synopsis" : {
"file" : "lib/Test/Synopsis.pm",
"version" : "0.18"
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "https://github.com/miyagawa/test-synopsis/issues"
},
"homepage" : "http://metacpan.org/release/Test-Synopsis",
"repository" : {
"type" : "git",
"url" : "git://github.com/miyagawa/test-synopsis.git",
"web" : "https://github.com/miyagawa/test-synopsis"
}
},
"version" : "0.18",
"x_Dist_Zilla" : {
"perl" : {
"version" : "5.042002"
},
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::OurPkgVersion",
"name" : "@Author::ZOFFIX/OurPkgVersion",
"version" : "0.21"
},
{
"class" : "Dist::Zilla::Plugin::Pod::Spiffy",
"name" : "@Author::ZOFFIX/Pod::Spiffy",
"version" : "1.001007"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
"config" : {
"Dist::Zilla::Plugin::PromptIfStale" : {
"check_all_plugins" : 1,
"check_all_prereqs" : 1,
"modules" : [],
"phase" : "release",
"run_under_travis" : 0,
"skip" : [
"ExtUtils::MakeMaker",
"File::Copy",
"IPC::Open3",
"base",
"strict",
"warnings"
]
}
},
"name" : "@Author::ZOFFIX/PromptIfStale",
"version" : "0.060"
},
{
"class" : "Dist::Zilla::Plugin::GatherDir",
"config" : {
"Dist::Zilla::Plugin::GatherDir" : {
"exclude_filename" : [],
"exclude_match" : [],
"follow_symlinks" : 0,
"include_dotfiles" : 0,
"prefix" : "",
"prune_directory" : [],
"root" : "."
}
},
"name" : "@Author::ZOFFIX/GatherDir",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@Author::ZOFFIX/PruneCruft",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@Author::ZOFFIX/ManifestSkip",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@Author::ZOFFIX/MetaYAML",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@Author::ZOFFIX/License",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@Author::ZOFFIX/Readme",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@Author::ZOFFIX/ExecDir",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@Author::ZOFFIX/ShareDir",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"config" : {
"Dist::Zilla::Role::TestRunner" : {
"default_jobs" : 1
}
},
"name" : "@Author::ZOFFIX/MakeMaker",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@Author::ZOFFIX/Manifest",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@Author::ZOFFIX/AutoPrereqs",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@Author::ZOFFIX/MetaConfig",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs::AuthorDeps",
"name" : "@Author::ZOFFIX/Prereqs::AuthorDeps",
"version" : "0.007"
},
{
"class" : "Dist::Zilla::Plugin::MinimumPerl",
"name" : "@Author::ZOFFIX/MinimumPerl",
"version" : "1.006"
},
{
"class" : "Dist::Zilla::Plugin::MetaProvides::Package",
"config" : {
"Dist::Zilla::Plugin::MetaProvides::Package" : {
"finder_objects" : [
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : "@Author::ZOFFIX/MetaProvides::Package/AUTOVIV/:InstallModulesPM",
"version" : "6.037"
}
],
"include_underscores" : 0
},
"Dist::Zilla::Role::MetaProvider::Provider" : {
"$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002004",
"inherit_missing" : 1,
"inherit_version" : 1,
"meta_noindex" : 1
},
"Dist::Zilla::Role::ModuleMetadata" : {
"Module::Metadata" : "1.000038",
"version" : "0.006"
}
},
"name" : "@Author::ZOFFIX/MetaProvides::Package",
"version" : "2.004003"
},
{
"class" : "Dist::Zilla::Plugin::InstallGuide",
"config" : {
"Dist::Zilla::Role::ModuleMetadata" : {
"Module::Metadata" : "1.000038",
"version" : "0.006"
}
},
"name" : "@Author::ZOFFIX/InstallGuide",
"version" : "1.200014"
},
{
"class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod",
"config" : {
"Dist::Zilla::Role::FileWatcher" : {
"version" : "0.006"
}
},
"name" : "@Author::ZOFFIX/ReadmeAnyFromPod",
"version" : "0.163250"
},
{
"class" : "Dist::Zilla::Plugin::Test::Compile",
"config" : {
"Dist::Zilla::Plugin::Test::Compile" : {
"bail_out_on_fail" : 0,
"fail_on_warning" : "author",
"fake_home" : 0,
"filename" : "t/00-compile.t",
"module_finder" : [
":InstallModules"
],
"needs_display" : 0,
"phase" : "test",
"script_finder" : [
":PerlExecFiles"
],
"skips" : [],
"switch" : []
}
},
"name" : "@Author::ZOFFIX/Test::Compile",
"version" : "2.059"
},
{
"class" : "Dist::Zilla::Plugin::Test::DistManifest",
"name" : "@Author::ZOFFIX/Test::DistManifest",
"version" : "2.000006"
},
{
"class" : "Dist::Zilla::Plugin::Test::EOL",
"config" : {
"Dist::Zilla::Plugin::Test::EOL" : {
"filename" : "xt/author/eol.t",
"finder" : [
":ExecFiles",
":InstallModules",
":TestFiles"
],
"trailing_whitespace" : 1
}
},
"name" : "@Author::ZOFFIX/Test::EOL",
"version" : "0.19"
},
{
"class" : "Dist::Zilla::Plugin::Test::Version",
"name" : "@Author::ZOFFIX/Test::Version",
"version" : "1.09"
},
{
"class" : "Dist::Zilla::Plugin::Test::Kwalitee",
"config" : {
"Dist::Zilla::Plugin::Test::Kwalitee" : {
"filename" : "xt/release/kwalitee.t",
"skiptest" : []
}
},
"name" : "@Author::ZOFFIX/Test::Kwalitee",
"version" : "2.13"
},
{
"class" : "Dist::Zilla::Plugin::MetaTests",
"name" : "@Author::ZOFFIX/MetaTests",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Test::CPAN::Meta::JSON",
"name" : "@Author::ZOFFIX/Test::CPAN::Meta::JSON",
"version" : "0.004"
},
{
"class" : "Dist::Zilla::Plugin::MojibakeTests",
"name" : "@Author::ZOFFIX/MojibakeTests",
"version" : "0.8"
},
{
"class" : "Dist::Zilla::Plugin::Test::NoTabs",
"config" : {
"Dist::Zilla::Plugin::Test::NoTabs" : {
"filename" : "xt/author/no-tabs.t",
"finder" : [
":InstallModules",
":ExecFiles",
":TestFiles"
]
}
},
"name" : "@Author::ZOFFIX/Test::NoTabs",
"version" : "0.15"
},
{
"class" : "Dist::Zilla::Plugin::PodCoverageTests",
"name" : "@Author::ZOFFIX/PodCoverageTests",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@Author::ZOFFIX/PodSyntaxTests",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Test::Portability",
"config" : {
"Dist::Zilla::Plugin::Test::Portability" : {
"options" : ""
}
},
"name" : "@Author::ZOFFIX/Test::Portability",
"version" : "2.001003"
},
{
"class" : "Dist::Zilla::Plugin::Test::Synopsis",
"name" : "@Author::ZOFFIX/Test::Synopsis",
"version" : "2.000007"
},
{
"class" : "Dist::Zilla::Plugin::Test::CPAN::Changes",
"config" : {
"Dist::Zilla::Plugin::Test::CPAN::Changes" : {
"changelog" : "Changes",
"filename" : "xt/release/cpan-changes.t"
}
},
"name" : "@Author::ZOFFIX/Test::CPAN::Changes",
"version" : "0.013"
},
{
"class" : "Dist::Zilla::Plugin::Test::PodSpelling",
"config" : {
"Dist::Zilla::Plugin::Test::PodSpelling" : {
"directories" : [
"bin",
"lib"
],
"spell_cmd" : "",
"stopwords" : [],
"wordlist" : "Pod::Wordlist"
}
},
"name" : "@Author::ZOFFIX/Test::PodSpelling",
"version" : "2.007006"
},
{
"class" : "Dist::Zilla::Plugin::CheckSelfDependency",
"config" : {
"Dist::Zilla::Plugin::CheckSelfDependency" : {
"finder" : [
":InstallModules"
]
},
"Dist::Zilla::Role::ModuleMetadata" : {
"Module::Metadata" : "1.000038",
"version" : "0.006"
}
},
"name" : "@Author::ZOFFIX/CheckSelfDependency",
"version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
"name" : "@Author::ZOFFIX/CheckPrereqsIndexed",
"version" : "0.022"
},
{
"class" : "Dist::Zilla::Plugin::Test::MinimumVersion",
"config" : {
"Dist::Zilla::Plugin::Test::MinimumVersion" : {
"max_target_perl" : "5.008008"
}
},
"name" : "@Author::ZOFFIX/Test::MinimumVersion",
"version" : "2.000011"
},
{
"class" : "Dist::Zilla::Plugin::CopyFilesFromRelease",
"config" : {
"Dist::Zilla::Plugin::CopyFilesFromRelease" : {
"filename" : [
"README.md"
],
"match" : []
}
},
"name" : "@Author::ZOFFIX/CopyFilesFromRelease",
"version" : "0.007"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@Author::ZOFFIX/TestRelease",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::InstallRelease",
"name" : "@Author::ZOFFIX/InstallRelease",
"version" : "0.008"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@Author::ZOFFIX/ConfirmRelease",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@Author::ZOFFIX/UploadToCPAN",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "test",
"type" : "requires"
}
},
"name" : "TestRequires",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "develop",
"type" : "requires"
}
},
"name" : "DevelopRequires",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::AutoMetaResources",
"name" : "AutoMetaResources",
"version" : "1.21"
},
{
"class" : "Dist::Zilla::Plugin::Meta::Contributors",
"name" : "Meta::Contributors",
"version" : "0.003"
},
{
"class" : "Dist::Zilla::Plugin::Git::NextVersion",
"config" : {
"Dist::Zilla::Plugin::Git::NextVersion" : {
"first_version" : "0.07",
"version_by_branch" : 0,
"version_regexp" : "(?^u:^(.+)$)"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.43.0",
"repo_root" : "."
}
},
"name" : "Git::NextVersion",
"version" : "2.052"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
"config" : {
"Dist::Zilla::Plugin::Git::Tag" : {
"branch" : null,
"changelog" : "Changes",
"signed" : 0,
"tag" : "0.18",
"tag_format" : "%v",
"tag_message" : "%v"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.43.0",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"time_zone" : "local"
}
},
"name" : "Git::Tag",
"version" : "2.052"
},
{
"class" : "Dist::Zilla::Plugin::Git::Check",
"config" : {
"Dist::Zilla::Plugin::Git::Check" : {
"untracked_files" : "die"
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"allow_dirty" : [
"Changes",
"dist.ini"
],
"allow_dirty_match" : [],
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.43.0",
"repo_root" : "."
}
},
"name" : "Git::Check",
"version" : "2.052"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
"config" : {
"Dist::Zilla::Plugin::Git::Commit" : {
"add_files_in" : [],
"commit_msg" : "v%V%n%n%c",
"signoff" : 0
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"allow_dirty" : [
"Changes",
"dist.ini"
],
"allow_dirty_match" : [],
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.43.0",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"time_zone" : "local"
}
},
"name" : "Git::Commit",
"version" : "2.052"
},
{
"class" : "Dist::Zilla::Plugin::Git::Push",
"config" : {
"Dist::Zilla::Plugin::Git::Push" : {
"push_to" : [
"origin"
],
"remotes_must_exist" : 1
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.43.0",
"repo_root" : "."
}
},
"name" : "Git::Push",
"version" : "2.052"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "MetaJSON",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExtraTestFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":PerlExecFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":AllFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":NoFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : "@Author::ZOFFIX/MetaProvides::Package/AUTOVIV/:InstallModulesPM",
"version" : "6.037"
}
],
"zilla" : {
"class" : "Dist::Zilla::Dist::Builder",
"config" : {
"is_trial" : 0
},
"version" : "6.037"
}
},
"x_contributors" : [
"Dave Rolsky ",
"Kevin Ryde ",
"Marcel Gr\u00fcnauer ",
"Mike Doherty ",
"Patrice Clement ",
"Greg Sabino Mullane ",
"Zoffix Znet ",
"Olivier Mengu\u00e9 "
],
"x_generated_by_perl" : "v5.42.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.42",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later"
}
t 000755 001750 001750 0 15225153025 14367 5 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18 06-for.t 100644 001750 001750 174 15225153025 15707 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/t no warnings;
use Test::Synopsis;
use Test::More tests => 2;
synopsis_ok("lib/Test/Synopsis.pm");
is $main::for_checked, 1;
Makefile.PL 100644 001750 001750 3015 15225153025 16235 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.037
use strict;
use warnings;
use 5.008001;
use ExtUtils::MakeMaker;
my %WriteMakefileArgs = (
"ABSTRACT" => "Test your SYNOPSIS code",
"AUTHOR" => "Tatsuhiko Miyagawa ",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "Test-Synopsis",
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.008001",
"NAME" => "Test::Synopsis",
"PREREQ_PM" => {
"ExtUtils::Manifest" => 0,
"Pod::Simple" => "3.09",
"Test::Builder::Module" => 0,
"parent" => 0,
"strict" => 0,
"warnings" => 0
},
"TEST_REQUIRES" => {
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Test::Builder" => "0.34",
"Test::Builder::Tester" => 0,
"Test::More" => 0
},
"VERSION" => "0.18",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"ExtUtils::Manifest" => 0,
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Pod::Simple" => "3.09",
"Test::Builder" => "0.34",
"Test::Builder::Module" => 0,
"Test::Builder::Tester" => 0,
"Test::More" => 0,
"parent" => 0,
"strict" => 0,
"warnings" => 0
);
unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
delete $WriteMakefileArgs{TEST_REQUIRES};
delete $WriteMakefileArgs{BUILD_REQUIRES};
$WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
WriteMakefile(%WriteMakefileArgs);
07-nopod.t 100644 001750 001750 116 15225153025 16235 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/t use Test::More tests => 1;
use Test::Synopsis;
synopsis_ok("t/lib/NoPod.pm");
04-HEREDOC.t 100644 001750 001750 126 15225153025 16165 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/t use Test::More tests => 1;
use Test::Synopsis;
synopsis_ok("t/lib/Test04HEREDOC.pm");
lib 000755 001750 001750 0 15225153025 15135 5 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/t NoPod.pm 100644 001750 001750 522 15225153025 16631 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/t/lib package Test::Synopsis::__TestBait_NoPod;
# Dummy module used during testing of Test::Synopsis. Needs to be in the lib/
# dir of the Test-Synopsis distribution to Test::Synopsis can find it.
#
# This module does not have a POD section at all; Test::Synopsis still
# shouldn't warn even with -w.
use strict;
use warnings;
# VERSION
1;
00-compile.t 100644 001750 001750 2613 15225153025 16563 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/t use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.059
use Test::More;
plan tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
my @module_files = (
'Test/Synopsis.pm'
);
# no fake home requested
my @switches = (
-d 'blib' ? '-Mblib' : '-Ilib',
);
use File::Spec;
use IPC::Open3;
use IO::Handle;
open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
my @warnings;
for my $lib (@module_files)
{
# see L
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'}.$str.q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
and not eval { +require blib; blib->VERSION('1.01') };
if (@_warnings)
{
warn @_warnings;
push @warnings, @_warnings;
}
}
is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING};
09-synopsis.t 100644 001750 001750 102 15225153025 17002 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/t use Test::Synopsis;
all_synopsis_ok(dump_all_code_on_error => 1);
Test03.pm 100644 001750 001750 363 15225153025 16677 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/t/lib package Test::Synopsis::__TestBait_Test03;
# Dummy module used during testing of Test::Synopsis
use strict;
use warnings;
# VERSION
1;
=pod
=head1 SYNOPSIS
Testing stuff:
BEGIN { our $Foo = 42; }
sub foobar { return 1; }
=cut
author 000755 001750 001750 0 15225153025 16061 5 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/xt eol.t 100644 001750 001750 2160 15225153025 17164 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/xt/author use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::EOL 0.19
use Test::More 0.88;
use Test::EOL;
my @files = (
'lib/Test/Synopsis.pm',
't/00-compile.t',
't/01-fail-if-SYNOPSIS-has-errors.t',
't/02-END-token-errors.t',
't/03-end-in-pod.t',
't/04-HEREDOC.t',
't/05-multi-chunks-clash.t',
't/05-multi-files-clash.t',
't/06-for.t',
't/07-nopod.t',
't/08-plain-text-in-pod.t',
't/09-synopsis.t',
't/10-in-pod-skip.t',
't/11-DATA-in-pod.t',
't/12-DATA-token-errors.t',
't/13-for-location.t',
't/lib/BrokenSYNOPSIS01.pm',
't/lib/ENDInPod.pm',
't/lib/ENDInPodWithError.pm',
't/lib/NoPod.pm',
't/lib/PlainTextInPod.pm',
't/lib/Test03.pm',
't/lib/Test03Other.pm',
't/lib/Test04HEREDOC.pm',
't/lib/Test10HEREDOC.pm',
't/lib/Test10InPodSkipWithBegin.pm',
't/lib/Test11DATAInPod.pm',
't/lib/Test12DATAInPodWithError.pm',
't/lib/TestForAfterCode.pm',
't/lib/TestForBeforeCode.pm',
't/lib/TestMultipleChunks.pm'
);
eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files;
done_testing;
03-end-in-pod.t 100644 001750 001750 121 15225153025 17040 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/t use Test::More tests => 1;
use Test::Synopsis;
synopsis_ok("t/lib/ENDInPod.pm");
ENDInPod.pm 100644 001750 001750 676 15225153025 17164 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/t/lib package Test::Synopsis::__TestBait_ENDinPod;
# Dummy module used during testing of Test::Synopsis. Needs to be in the lib/
# dir of the Test-Synopsis distribution to Test::Synopsis can find it.
#
# This module has an __END__ in the synopsis code; it shouldn't
# break Test::Synopsis
use strict;
use warnings;
# VERSION
1;
=pod
=head1 SYNOPSIS
Testing stuff:
print "Foos!\n";
__END__
BLARGHS!
=head1 DESCRIPTION
bleh
=cut
10-in-pod-skip.t 100644 001750 001750 141 15225153025 17240 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/t use Test::More tests => 1;
use Test::Synopsis;
synopsis_ok("t/lib/Test10InPodSkipWithBegin.pm");
11-DATA-in-pod.t 100644 001750 001750 130 15225153025 17002 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/t use Test::More tests => 1;
use Test::Synopsis;
synopsis_ok("t/lib/Test11DATAInPod.pm");
13-for-location.t 100644 001750 001750 756 15225153025 17521 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/t use strict;
use warnings;
use Test::Synopsis;
use Test::More tests => 2;
# GH #20: a =for test_synopsis directive must be applied to the SYNOPSIS
# code regardless of whether it appears before or after the code block.
# Before the fix, a =for placed AFTER the code block was collected too
# late and never applied, so this compile check failed with
# "Global symbol '$assa' requires explicit package name".
synopsis_ok("t/lib/TestForBeforeCode.pm");
synopsis_ok("t/lib/TestForAfterCode.pm");
no-tabs.t 100644 001750 001750 2126 15225153025 17752 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/xt/author use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15
use Test::More 0.88;
use Test::NoTabs;
my @files = (
'lib/Test/Synopsis.pm',
't/00-compile.t',
't/01-fail-if-SYNOPSIS-has-errors.t',
't/02-END-token-errors.t',
't/03-end-in-pod.t',
't/04-HEREDOC.t',
't/05-multi-chunks-clash.t',
't/05-multi-files-clash.t',
't/06-for.t',
't/07-nopod.t',
't/08-plain-text-in-pod.t',
't/09-synopsis.t',
't/10-in-pod-skip.t',
't/11-DATA-in-pod.t',
't/12-DATA-token-errors.t',
't/13-for-location.t',
't/lib/BrokenSYNOPSIS01.pm',
't/lib/ENDInPod.pm',
't/lib/ENDInPodWithError.pm',
't/lib/NoPod.pm',
't/lib/PlainTextInPod.pm',
't/lib/Test03.pm',
't/lib/Test03Other.pm',
't/lib/Test04HEREDOC.pm',
't/lib/Test10HEREDOC.pm',
't/lib/Test10InPodSkipWithBegin.pm',
't/lib/Test11DATAInPod.pm',
't/lib/Test12DATAInPodWithError.pm',
't/lib/TestForAfterCode.pm',
't/lib/TestForBeforeCode.pm',
't/lib/TestMultipleChunks.pm'
);
notabs_ok($_) foreach @files;
done_testing;
Test 000755 001750 001750 0 15225153025 15611 5 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/lib Synopsis.pm 100644 001750 001750 25450 15225153025 20164 0 ustar 00zoffix zoffix 000000 000000 Test-Synopsis-0.18/lib/Test package Test::Synopsis;
use strict;
use warnings;
use 5.008_001;
our $VERSION = '0.18'; # VERSION
use parent qw( Test::Builder::Module );
our @EXPORT = qw( synopsis_ok all_synopsis_ok );
use ExtUtils::Manifest qw( maniread );
my %ARGS;
# = ( dump_all_code_on_error => 1 ); ### REMOVE THIS FOR PRODUCTION!!!
sub all_synopsis_ok {
%ARGS = @_;
my $manifest = maniread();
my @files = grep m!^lib/.*\.p(od|m)$!, keys %$manifest
or __PACKAGE__->builder->skip_all('No files in lib to test');
__PACKAGE__->builder->no_plan();
synopsis_ok(@files);
}
sub synopsis_ok {
my @files = @_;
for my $file (@files) {
my $blocks = _extract_synopsis($file);
unless (@$blocks) {
__PACKAGE__->builder->ok(1, "No SYNOPSIS code");
next;
}
my $block_num = 0;
for my $block (@$blocks) {
$block_num++;
my ($line, $code, $options) = @$block;
# don't want __END__ blocks in SYNOPSIS chopping our '}' in wrapper sub
# same goes for __DATA__ and although we'll be sticking an extra '}'
# into its contents; it shouldn't matter since the code shouldn't be
# run anyways.
$code =~ s/(?=(?:__END__|__DATA__)\s*$)/}\n/m;
$options = join(";", @$options);
my $test = qq($options;\nsub{\n#line $line "$file"\n$code\n;});
#use Test::More (); Test::More::note "=========\n$test\n========";
my $ok = _compile($test);
# See if the user is trying to skip this test using the =for block
if ( !$ok and $@=~/^SKIP:.+BEGIN failed--compilation aborted/si ) {
$@ =~ s/^SKIP:\s*//;
$@ =~ s/\nBEGIN failed--compilation aborted at.+//s;
__PACKAGE__->builder->skip($@, 1);
} else {
my $block_name = $file;
## Show block number only if more than one block
if (@$blocks > 1) {
$block_name .= " (section $block_num)";
}
__PACKAGE__->builder->ok($ok, $block_name)
or __PACKAGE__->builder->diag(
$ARGS{dump_all_code_on_error}
? "$@\nEVALED CODE:\n$test"
: $@
);
}
}
}
}
my $sandbox = 0;
sub _compile {
package
Test::Synopsis::Sandbox;
eval sprintf "package\nTest::Synopsis::Sandbox%d;\n%s",
++$sandbox, $_[0]; ## no critic
}
sub _extract_synopsis
{
my $file = shift;
my $parser = Test::Synopsis::Parser->new;
$parser->parse_file($file);
# Attach the fully-collected =for test_synopsis options to every block,
# so directives apply regardless of their position relative to the
# SYNOPSIS code block (restores pre-0.14, position-independent behavior).
$_->[2] = $parser->{tsyn_options} for @{ $parser->{tsyn_blocks} };
$parser->{tsyn_blocks}
}
package
Test::Synopsis::Parser; # on new line to avoid indexing
use Pod::Simple 3.09;
use parent 'Pod::Simple';
sub new
{
my $self = shift->SUPER::new(@_);
$self->accept_targets('test_synopsis');
$self->merge_text(1);
$self->no_errata_section(1);
$self->strip_verbatim_indent(sub {
my $lines = shift;
my ($indent) = $lines->[0] =~ /^(\s*)/;
$indent
});
$self->{tsyn_stack} = [];
$self->{tsyn_options} = [];
$self->{tsyn_blocks} = [];
$self->{tsyn_in_synopsis} = '';
$self
}
sub _handle_element_start
{
my ($self, $element_name, $attrs) = @_;
#Test::More::note Test::More::explain($element_name);
#Test::More::note Test::More::explain($attrs);
push @{$self->{tsyn_stack}}, [ $element_name, $attrs ];
}
sub _handle_element_end
{
return unless $_[0]->{tsyn_stack};
pop @{ $_[0]->{tsyn_stack} };
}
sub _handle_text
{
return unless $_[0]->{tsyn_stack};
my ($self, $text) = @_;
my $elt = $self->{tsyn_stack}[-1][0];
if ($elt eq 'head1') {
if ($self->{tsyn_in_synopsis}) {
# Exiting SYNOPSIS => Skip everything to the end
delete $self->{tsyn_stack};
}
$self->{tsyn_in_synopsis} = $text =~ /SYNOPSIS\s*$/;
} elsif ($elt eq 'Data') {
# use Test::More; Test::More::note "XXX";
my $up = $self->{tsyn_stack}[-2];
if ($up->[0] eq 'for' && $up->[1]->{target} eq 'test_synopsis') {
my $line = $up->[1]{start_line};
my $file = $self->source_filename;
push @{$self->{tsyn_options}}, qq<#line $line "$file"\n$text\n>;
}
} elsif ($elt eq 'Verbatim' && $self->{tsyn_in_synopsis}) {
my $line = $self->{tsyn_stack}[-1][1]{start_line};
push @{ $self->{tsyn_blocks} }, [
$line,
$text,
];
}
}
1;
__END__
=encoding utf-8
=for stopwords Goro blogged Znet Zoffix DOHERTY Doherty
KRYDE Ryde ZOFFIX Gr nauer Grünauer pm HEREDOC HEREDOCs DROLSKY
Mengué
=for test_synopsis $main::for_checked=1
=head1 NAME
Test::Synopsis - Test your SYNOPSIS code
=head1 SYNOPSIS
# xt/synopsis.t (with Module::Install::AuthorTests)
use Test::Synopsis;
all_synopsis_ok();
# Or, run safe without Test::Synopsis
use Test::More;
eval "use Test::Synopsis";
plan skip_all => "Test::Synopsis required for testing" if $@;
all_synopsis_ok();
=head1 DESCRIPTION
Test::Synopsis is an (author) test module to find .pm or .pod files
under your I directory and then make sure the example snippet
code in your I section passes the perl compile check.
Note that this module only checks the perl syntax (by wrapping the
code with C) and doesn't actually run the code, B
that code is a C block or a C