Test-WWW-Mechanize-PSGI-0.38/ 000755 000765 000024 00000000000 13205615472 015577 5 ustar 00olaf staff 000000 000000 Test-WWW-Mechanize-PSGI-0.38/Changes 000644 000765 000024 00000001466 13205615472 017101 0 ustar 00olaf staff 000000 000000 Revision history for Perl module Test::WWW::Mechanize::PSGI:
0.38 2017-11-23 19:02:15Z
- Make UA aware of base URLs which are defined in the
of an HTML
document (Olaf Alders)
- Ensure that handlers run in the expected order (Olaf Alders)
0.37 2017-06-14 10:31:08-04:00 America/Toronto
- Make the submit_form_ok example runnable (Tadeusz Sośnierz)
0.36 2016-05-28 08:24:37 America/Toronto
- The previous release should have been 0.36, so bumping the version and
re-releasing.
0.35 2016-05-19 17:23:53 America/Toronto
- run request_send handlers before sending request (Olaf Alders)
0.34 Sun Jan 3 12:02:29 GMT 2010
- update the README to reflect the name
- fix handling of cookies, patch by tokuhirom
0.33 Tue Dec 15 07:12:18 GMT 2009
- initial release
Test-WWW-Mechanize-PSGI-0.38/CONTRIBUTORS 000644 000765 000024 00000000570 13205615472 017461 0 ustar 00olaf staff 000000 000000
# TEST-WWW-MECHANIZE-PSGI CONTRIBUTORS #
This is the (likely incomplete) list of people who have helped
make this distribution what it is, either via code contributions,
patches, bug reports, help with troubleshooting, etc. A huge
'thank you' to all of them.
* Chia-liang Kao
* moznion
* Olaf Alders
* Shin Kojima
* Tadeusz Sośnierz
* tokuhirom
Test-WWW-Mechanize-PSGI-0.38/cpanfile 000644 000765 000024 00000002613 13205615472 017305 0 ustar 00olaf staff 000000 000000 requires "Carp" => "0";
requires "HTTP::Message::PSGI" => "0";
requires "Test::WWW::Mechanize" => "0";
requires "Try::Tiny" => "0";
requires "base" => "0";
requires "perl" => "5.006";
requires "strict" => "0";
requires "warnings" => "0";
on 'test' => sub {
requires "CGI::Cookie" => "0";
requires "ExtUtils::MakeMaker" => "0";
requires "File::Spec" => "0";
requires "Test::More" => "0";
requires "perl" => "5.006";
};
on 'test' => sub {
recommends "CPAN::Meta" => "2.120900";
};
on 'configure' => sub {
requires "ExtUtils::MakeMaker" => "0";
requires "perl" => "5.006";
};
on 'configure' => sub {
suggests "JSON::PP" => "2.27300";
};
on 'develop' => sub {
requires "Pod::Coverage::TrustPod" => "0";
requires "Pod::Wordlist" => "0";
requires "Test::CPAN::Changes" => "0.19";
requires "Test::Code::TidyAll" => "0.50";
requires "Test::More" => "0.96";
requires "Test::Pod::Coverage" => "1.08";
requires "Test::Spelling" => "0.12";
requires "Test::Synopsis" => "0";
};
on 'develop' => sub {
suggests "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" => "0.004";
suggests "Dist::Zilla::Plugin::CopyFilesFromRelease" => "0";
suggests "Dist::Zilla::Plugin::Git::Commit" => "2.020";
suggests "Dist::Zilla::Plugin::Git::Tag" => "0";
suggests "Dist::Zilla::Plugin::NextRelease" => "5.033";
suggests "Dist::Zilla::Plugin::RewriteVersion::Transitional" => "0.004";
};
Test-WWW-Mechanize-PSGI-0.38/dist.ini 000644 000765 000024 00000000362 13205615472 017244 0 ustar 00olaf staff 000000 000000 name = Test-WWW-Mechanize-PSGI
author = Leon Brocard
license = Perl_5
copyright_holder = Leon Brocard
copyright_year = 2009
main_module = lib/Test/WWW/Mechanize/PSGI.pm
[@Author::OALDERS]
-remove = Test::Perl::Critic
Test-WWW-Mechanize-PSGI-0.38/INSTALL 000644 000765 000024 00000002310 13205615472 016624 0 ustar 00olaf staff 000000 000000 This is the Perl distribution Test-WWW-Mechanize-PSGI.
Installing Test-WWW-Mechanize-PSGI is straightforward.
## Installation with cpanm
If you have cpanm, you only need one line:
% cpanm Test::WWW::Mechanize::PSGI
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::WWW::Mechanize::PSGI
## Manual installation
As a last resort, you can manually install it. Download the tarball, untar it,
then build it:
% perl Makefile.PL
% make && make test
Then install it:
% make install
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
## Documentation
Test-WWW-Mechanize-PSGI documentation is available as POD.
You can run perldoc from a shell to read the documentation:
% perldoc Test::WWW::Mechanize::PSGI
Test-WWW-Mechanize-PSGI-0.38/lib/ 000755 000765 000024 00000000000 13205615472 016345 5 ustar 00olaf staff 000000 000000 Test-WWW-Mechanize-PSGI-0.38/LICENSE 000644 000765 000024 00000043655 13205615472 016621 0 ustar 00olaf staff 000000 000000 This software is copyright (c) 2009 by Leon Brocard.
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) 2009 by Leon Brocard.
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.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
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, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
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
Ty Coon, President of Vice
That's all there is to it!
--- The Artistic License 1.0 ---
This software is Copyright (c) 2009 by Leon Brocard.
This is free software, licensed under:
The 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.
- "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 ftp.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) accompany any non-standard executables with their corresponding Standard
Version executables, giving the non-standard executables non-standard
names, and clearly documenting 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.
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 whomever generated them, and may be sold
commercially, and may be aggregated with this Package.
7. C or perl subroutines supplied by you and linked into this Package shall not
be considered part of this Package.
8. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.
9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End
Test-WWW-Mechanize-PSGI-0.38/Makefile.PL 000644 000765 000024 00000002706 13205615472 017556 0 ustar 00olaf staff 000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.010.
use strict;
use warnings;
use 5.006;
use ExtUtils::MakeMaker;
my %WriteMakefileArgs = (
"ABSTRACT" => "Test PSGI programs using WWW::Mechanize",
"AUTHOR" => "Leon Brocard ",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "Test-WWW-Mechanize-PSGI",
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.006",
"NAME" => "Test::WWW::Mechanize::PSGI",
"PREREQ_PM" => {
"Carp" => 0,
"HTTP::Message::PSGI" => 0,
"Test::WWW::Mechanize" => 0,
"Try::Tiny" => 0,
"base" => 0,
"strict" => 0,
"warnings" => 0
},
"TEST_REQUIRES" => {
"CGI::Cookie" => 0,
"ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"Test::More" => 0
},
"VERSION" => "0.38",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"CGI::Cookie" => 0,
"Carp" => 0,
"ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"HTTP::Message::PSGI" => 0,
"Test::More" => 0,
"Test::WWW::Mechanize" => 0,
"Try::Tiny" => 0,
"base" => 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);
Test-WWW-Mechanize-PSGI-0.38/MANIFEST 000644 000765 000024 00000000707 13205615472 016734 0 ustar 00olaf staff 000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.010.
CONTRIBUTORS
Changes
INSTALL
LICENSE
MANIFEST
META.json
META.yml
Makefile.PL
README.md
cpanfile
dist.ini
lib/Test/WWW/Mechanize/PSGI.pm
perlcriticrc
perltidyrc
t/00-report-prereqs.dd
t/00-report-prereqs.t
t/cookie.t
t/handlers.t
t/pod.t
t/simple.t
tidyall.ini
xt/author/pod-coverage.t
xt/author/pod-spell.t
xt/author/synopsis.t
xt/author/tidyall.t
xt/release/cpan-changes.t
Test-WWW-Mechanize-PSGI-0.38/META.json 000644 000765 000024 00000061274 13205615472 017232 0 ustar 00olaf staff 000000 000000 {
"abstract" : "Test PSGI programs using WWW::Mechanize",
"author" : [
"Leon Brocard "
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : 2
},
"name" : "Test-WWW-Mechanize-PSGI",
"no_index" : {
"directory" : [
"examples",
"t",
"xt"
]
},
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0",
"perl" : "5.006"
},
"suggests" : {
"JSON::PP" : "2.27300"
}
},
"develop" : {
"requires" : {
"Pod::Coverage::TrustPod" : "0",
"Pod::Wordlist" : "0",
"Test::CPAN::Changes" : "0.19",
"Test::Code::TidyAll" : "0.50",
"Test::More" : "0.96",
"Test::Pod::Coverage" : "1.08",
"Test::Spelling" : "0.12",
"Test::Synopsis" : "0"
},
"suggests" : {
"Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : "0.004",
"Dist::Zilla::Plugin::CopyFilesFromRelease" : "0",
"Dist::Zilla::Plugin::Git::Commit" : "2.020",
"Dist::Zilla::Plugin::Git::Tag" : "0",
"Dist::Zilla::Plugin::NextRelease" : "5.033",
"Dist::Zilla::Plugin::RewriteVersion::Transitional" : "0.004"
}
},
"runtime" : {
"requires" : {
"Carp" : "0",
"HTTP::Message::PSGI" : "0",
"Test::WWW::Mechanize" : "0",
"Try::Tiny" : "0",
"base" : "0",
"perl" : "5.006",
"strict" : "0",
"warnings" : "0"
}
},
"test" : {
"recommends" : {
"CPAN::Meta" : "2.120900"
},
"requires" : {
"CGI::Cookie" : "0",
"ExtUtils::MakeMaker" : "0",
"File::Spec" : "0",
"Test::More" : "0",
"perl" : "5.006"
}
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "https://github.com/acme/test-www-mechanize-psgi/issues"
},
"homepage" : "https://github.com/acme/test-www-mechanize-psgi",
"repository" : {
"type" : "git",
"url" : "https://github.com/acme/test-www-mechanize-psgi.git",
"web" : "https://github.com/acme/test-www-mechanize-psgi"
}
},
"version" : "0.38",
"x_Dist_Zilla" : {
"perl" : {
"version" : "5.026000"
},
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
"config" : {
"Dist::Zilla::Plugin::PromptIfStale" : {
"check_all_plugins" : 0,
"check_all_prereqs" : 0,
"modules" : [
"Dist::Zilla::PluginBundle::Author::OALDERS"
],
"phase" : "build",
"run_under_travis" : 0,
"skip" : []
}
},
"name" : "@Author::OALDERS/stale modules, build",
"version" : "0.054"
},
{
"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" : []
}
},
"name" : "@Author::OALDERS/stale modules, release",
"version" : "0.054"
},
{
"class" : "Dist::Zilla::Plugin::MAXMIND::TidyAll",
"name" : "@Author::OALDERS/MAXMIND::TidyAll",
"version" : "0.82"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@Author::OALDERS/AutoPrereqs",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::CheckChangesHasContent",
"name" : "@Author::OALDERS/CheckChangesHasContent",
"version" : "0.010"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"config" : {
"Dist::Zilla::Role::TestRunner" : {
"default_jobs" : 1
}
},
"name" : "@Author::OALDERS/MakeMaker",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::CPANFile",
"name" : "@Author::OALDERS/CPANFile",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::ContributorsFile",
"name" : "@Author::OALDERS/ContributorsFile",
"version" : "0.3.0"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@Author::OALDERS/MetaJSON",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@Author::OALDERS/MetaYAML",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@Author::OALDERS/Manifest",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::MetaNoIndex",
"name" : "@Author::OALDERS/MetaNoIndex",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@Author::OALDERS/MetaConfig",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::MetaResources",
"name" : "@Author::OALDERS/MetaResources",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@Author::OALDERS/License",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::InstallGuide",
"name" : "@Author::OALDERS/InstallGuide",
"version" : "1.200007"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "runtime",
"type" : "requires"
}
},
"name" : "@Author::OALDERS/Prereqs",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@Author::OALDERS/ExecDir",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::Test::PodSpelling",
"config" : {
"Dist::Zilla::Plugin::Test::PodSpelling" : {
"directories" : [
"bin",
"lib"
],
"spell_cmd" : "",
"stopwords" : [
"Alders",
"Alders'",
"maxlength",
"params"
],
"wordlist" : "Pod::Wordlist"
}
},
"name" : "@Author::OALDERS/Test::PodSpelling",
"version" : "2.007004"
},
{
"class" : "Dist::Zilla::Plugin::PodCoverageTests",
"name" : "@Author::OALDERS/PodCoverageTests",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::Test::CPAN::Changes",
"config" : {
"Dist::Zilla::Plugin::Test::CPAN::Changes" : {
"changelog" : "Changes"
}
},
"name" : "@Author::OALDERS/Test::CPAN::Changes",
"version" : "0.012"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@Author::OALDERS/TestRelease",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::Test::ReportPrereqs",
"name" : "@Author::OALDERS/Test::ReportPrereqs",
"version" : "0.027"
},
{
"class" : "Dist::Zilla::Plugin::Test::Synopsis",
"name" : "@Author::OALDERS/Test::Synopsis",
"version" : "2.000007"
},
{
"class" : "Dist::Zilla::Plugin::Test::TidyAll",
"name" : "@Author::OALDERS/Test::TidyAll",
"version" : "0.04"
},
{
"class" : "Dist::Zilla::Plugin::RunExtraTests",
"config" : {
"Dist::Zilla::Role::TestRunner" : {
"default_jobs" : 1
}
},
"name" : "@Author::OALDERS/RunExtraTests",
"version" : "0.029"
},
{
"class" : "Dist::Zilla::Plugin::MinimumPerl",
"name" : "@Author::OALDERS/MinimumPerl",
"version" : "1.006"
},
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
"config" : {
"Dist::Zilla::Plugin::PodWeaver" : {
"finder" : [
":InstallModules",
":ExecFiles"
],
"plugins" : [
{
"class" : "Pod::Weaver::Plugin::EnsurePod5",
"name" : "@CorePrep/EnsurePod5",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Plugin::H1Nester",
"name" : "@CorePrep/H1Nester",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Plugin::SingleEncoding",
"name" : "@Default/SingleEncoding",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Name",
"name" : "@Default/Name",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Version",
"name" : "@Default/Version",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@Default/prelude",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "SYNOPSIS",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "DESCRIPTION",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "OVERVIEW",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "ATTRIBUTES",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "METHODS",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "FUNCTIONS",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Leftovers",
"name" : "@Default/Leftovers",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@Default/postlude",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Authors",
"name" : "@Default/Authors",
"version" : "4.015"
},
{
"class" : "Pod::Weaver::Section::Legal",
"name" : "@Default/Legal",
"version" : "4.015"
}
]
}
},
"name" : "@Author::OALDERS/PodWeaver",
"version" : "4.008"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@Author::OALDERS/PruneCruft",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::CopyFilesFromBuild",
"name" : "@Author::OALDERS/CopyFilesFromBuild",
"version" : "0.170880"
},
{
"class" : "Dist::Zilla::Plugin::GithubMeta",
"name" : "@Author::OALDERS/GithubMeta",
"version" : "0.54"
},
{
"class" : "Dist::Zilla::Plugin::Git::GatherDir",
"config" : {
"Dist::Zilla::Plugin::GatherDir" : {
"exclude_filename" : [
"Install",
"LICENSE",
"META.json",
"Makefile.PL",
"README.md",
"cpanfile"
],
"exclude_match" : [],
"follow_symlinks" : 0,
"include_dotfiles" : 0,
"prefix" : "",
"prune_directory" : [],
"root" : "."
},
"Dist::Zilla::Plugin::Git::GatherDir" : {
"include_untracked" : 0
}
},
"name" : "@Author::OALDERS/Git::GatherDir",
"version" : "2.042"
},
{
"class" : "Dist::Zilla::Plugin::CopyFilesFromRelease",
"config" : {
"Dist::Zilla::Plugin::CopyFilesFromRelease" : {
"filename" : [
"Install"
],
"match" : []
}
},
"name" : "@Author::OALDERS/CopyFilesFromRelease",
"version" : "0.006"
},
{
"class" : "Dist::Zilla::Plugin::Git::Check",
"config" : {
"Dist::Zilla::Plugin::Git::Check" : {
"untracked_files" : "die"
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"allow_dirty" : [
"Changes",
"Install",
"LICENSE",
"META.json",
"Makefile.PL",
"README.md",
"cpanfile",
"dist.ini"
],
"allow_dirty_match" : [],
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.14.1",
"repo_root" : "."
}
},
"name" : "@Author::OALDERS/Git::Check",
"version" : "2.042"
},
{
"class" : "Dist::Zilla::Plugin::Git::Contributors",
"config" : {
"Dist::Zilla::Plugin::Git::Contributors" : {
"git_version" : "2.14.1",
"include_authors" : 0,
"include_releaser" : 1,
"order_by" : "name",
"paths" : []
}
},
"name" : "@Author::OALDERS/Git::Contributors",
"version" : "0.030"
},
{
"class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod",
"config" : {
"Dist::Zilla::Role::FileWatcher" : {
"version" : "0.006"
}
},
"name" : "@Author::OALDERS/ReadmeMdInBuild",
"version" : "0.163250"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@Author::OALDERS/ShareDir",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::TravisCI::StatusBadge",
"name" : "@Author::OALDERS/TravisCI::StatusBadge",
"version" : "0.007"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@Author::OALDERS/ConfirmRelease",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@Author::OALDERS/UploadToCPAN",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::RewriteVersion::Transitional",
"config" : {
"Dist::Zilla::Plugin::RewriteVersion" : {
"add_tarball_name" : 0,
"finders" : [
":ExecFiles",
":InstallModules"
],
"global" : 0,
"skip_version_provider" : 0
},
"Dist::Zilla::Plugin::RewriteVersion::Transitional" : {}
},
"name" : "@Author::OALDERS/@Git::VersionManager/RewriteVersion::Transitional",
"version" : "0.008"
},
{
"class" : "Dist::Zilla::Plugin::MetaProvides::Update",
"name" : "@Author::OALDERS/@Git::VersionManager/MetaProvides::Update",
"version" : "0.002"
},
{
"class" : "Dist::Zilla::Plugin::CopyFilesFromRelease",
"config" : {
"Dist::Zilla::Plugin::CopyFilesFromRelease" : {
"filename" : [
"Changes"
],
"match" : []
}
},
"name" : "@Author::OALDERS/@Git::VersionManager/CopyFilesFromRelease",
"version" : "0.006"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
"config" : {
"Dist::Zilla::Plugin::Git::Commit" : {
"add_files_in" : [],
"commit_msg" : "v%v%n%n%c"
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"allow_dirty" : [
"Changes",
"Install",
"LICENSE",
"META.json",
"Makefile.PL",
"README.md",
"cpanfile",
"dist.ini"
],
"allow_dirty_match" : [],
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.14.1",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"time_zone" : "local"
}
},
"name" : "@Author::OALDERS/@Git::VersionManager/release snapshot",
"version" : "2.042"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
"config" : {
"Dist::Zilla::Plugin::Git::Tag" : {
"branch" : null,
"changelog" : "Changes",
"signed" : 0,
"tag" : "v0.38",
"tag_format" : "v%v",
"tag_message" : "v%v"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.14.1",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"time_zone" : "local"
}
},
"name" : "@Author::OALDERS/@Git::VersionManager/Git::Tag",
"version" : "2.042"
},
{
"class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional",
"config" : {
"Dist::Zilla::Plugin::BumpVersionAfterRelease" : {
"finders" : [
":ExecFiles",
":InstallModules"
],
"global" : 0,
"munge_makefile_pl" : 1
},
"Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : {}
},
"name" : "@Author::OALDERS/@Git::VersionManager/BumpVersionAfterRelease::Transitional",
"version" : "0.008"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@Author::OALDERS/@Git::VersionManager/NextRelease",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
"config" : {
"Dist::Zilla::Plugin::Git::Commit" : {
"add_files_in" : [],
"commit_msg" : "increment $VERSION after %v release"
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"allow_dirty" : [
"Changes"
],
"allow_dirty_match" : [
"(?^:^lib/.*\\.pm$)"
],
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.14.1",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"time_zone" : "local"
}
},
"name" : "@Author::OALDERS/@Git::VersionManager/post-release commit",
"version" : "2.042"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "develop",
"type" : "suggests"
}
},
"name" : "@Author::OALDERS/@Git::VersionManager/prereqs for @Git::VersionManager",
"version" : "6.010"
},
{
"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.14.1",
"repo_root" : "."
}
},
"name" : "@Author::OALDERS/Git::Push",
"version" : "2.042"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExtraTestFiles",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":PerlExecFiles",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":AllFiles",
"version" : "6.010"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":NoFiles",
"version" : "6.010"
}
],
"zilla" : {
"class" : "Dist::Zilla::Dist::Builder",
"config" : {
"is_trial" : 0
},
"version" : "6.010"
}
},
"x_contributors" : [
"Chia-liang Kao ",
"moznion ",
"Olaf Alders ",
"Shin Kojima ",
"Tadeusz So\u015bnierz ",
"tokuhirom "
],
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0233"
}
Test-WWW-Mechanize-PSGI-0.38/META.yml 000644 000765 000024 00000037203 13205615472 017055 0 ustar 00olaf staff 000000 000000 ---
abstract: 'Test PSGI programs using WWW::Mechanize'
author:
- 'Leon Brocard '
build_requires:
CGI::Cookie: '0'
ExtUtils::MakeMaker: '0'
File::Spec: '0'
Test::More: '0'
perl: '5.006'
configure_requires:
ExtUtils::MakeMaker: '0'
perl: '5.006'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.010, 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-WWW-Mechanize-PSGI
no_index:
directory:
- examples
- t
- xt
requires:
Carp: '0'
HTTP::Message::PSGI: '0'
Test::WWW::Mechanize: '0'
Try::Tiny: '0'
base: '0'
perl: '5.006'
strict: '0'
warnings: '0'
resources:
bugtracker: https://github.com/acme/test-www-mechanize-psgi/issues
homepage: https://github.com/acme/test-www-mechanize-psgi
repository: https://github.com/acme/test-www-mechanize-psgi.git
version: '0.38'
x_Dist_Zilla:
perl:
version: '5.026000'
plugins:
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
Dist::Zilla::Plugin::PromptIfStale:
check_all_plugins: 0
check_all_prereqs: 0
modules:
- Dist::Zilla::PluginBundle::Author::OALDERS
phase: build
run_under_travis: 0
skip: []
name: '@Author::OALDERS/stale modules, build'
version: '0.054'
-
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: []
name: '@Author::OALDERS/stale modules, release'
version: '0.054'
-
class: Dist::Zilla::Plugin::MAXMIND::TidyAll
name: '@Author::OALDERS/MAXMIND::TidyAll'
version: '0.82'
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@Author::OALDERS/AutoPrereqs'
version: '6.010'
-
class: Dist::Zilla::Plugin::CheckChangesHasContent
name: '@Author::OALDERS/CheckChangesHasContent'
version: '0.010'
-
class: Dist::Zilla::Plugin::MakeMaker
config:
Dist::Zilla::Role::TestRunner:
default_jobs: 1
name: '@Author::OALDERS/MakeMaker'
version: '6.010'
-
class: Dist::Zilla::Plugin::CPANFile
name: '@Author::OALDERS/CPANFile'
version: '6.010'
-
class: Dist::Zilla::Plugin::ContributorsFile
name: '@Author::OALDERS/ContributorsFile'
version: 0.3.0
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@Author::OALDERS/MetaJSON'
version: '6.010'
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@Author::OALDERS/MetaYAML'
version: '6.010'
-
class: Dist::Zilla::Plugin::Manifest
name: '@Author::OALDERS/Manifest'
version: '6.010'
-
class: Dist::Zilla::Plugin::MetaNoIndex
name: '@Author::OALDERS/MetaNoIndex'
version: '6.010'
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@Author::OALDERS/MetaConfig'
version: '6.010'
-
class: Dist::Zilla::Plugin::MetaResources
name: '@Author::OALDERS/MetaResources'
version: '6.010'
-
class: Dist::Zilla::Plugin::License
name: '@Author::OALDERS/License'
version: '6.010'
-
class: Dist::Zilla::Plugin::InstallGuide
name: '@Author::OALDERS/InstallGuide'
version: '1.200007'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: runtime
type: requires
name: '@Author::OALDERS/Prereqs'
version: '6.010'
-
class: Dist::Zilla::Plugin::ExecDir
name: '@Author::OALDERS/ExecDir'
version: '6.010'
-
class: Dist::Zilla::Plugin::Test::PodSpelling
config:
Dist::Zilla::Plugin::Test::PodSpelling:
directories:
- bin
- lib
spell_cmd: ''
stopwords:
- Alders
- "Alders'"
- maxlength
- params
wordlist: Pod::Wordlist
name: '@Author::OALDERS/Test::PodSpelling'
version: '2.007004'
-
class: Dist::Zilla::Plugin::PodCoverageTests
name: '@Author::OALDERS/PodCoverageTests'
version: '6.010'
-
class: Dist::Zilla::Plugin::Test::CPAN::Changes
config:
Dist::Zilla::Plugin::Test::CPAN::Changes:
changelog: Changes
name: '@Author::OALDERS/Test::CPAN::Changes'
version: '0.012'
-
class: Dist::Zilla::Plugin::TestRelease
name: '@Author::OALDERS/TestRelease'
version: '6.010'
-
class: Dist::Zilla::Plugin::Test::ReportPrereqs
name: '@Author::OALDERS/Test::ReportPrereqs'
version: '0.027'
-
class: Dist::Zilla::Plugin::Test::Synopsis
name: '@Author::OALDERS/Test::Synopsis'
version: '2.000007'
-
class: Dist::Zilla::Plugin::Test::TidyAll
name: '@Author::OALDERS/Test::TidyAll'
version: '0.04'
-
class: Dist::Zilla::Plugin::RunExtraTests
config:
Dist::Zilla::Role::TestRunner:
default_jobs: 1
name: '@Author::OALDERS/RunExtraTests'
version: '0.029'
-
class: Dist::Zilla::Plugin::MinimumPerl
name: '@Author::OALDERS/MinimumPerl'
version: '1.006'
-
class: Dist::Zilla::Plugin::PodWeaver
config:
Dist::Zilla::Plugin::PodWeaver:
finder:
- ':InstallModules'
- ':ExecFiles'
plugins:
-
class: Pod::Weaver::Plugin::EnsurePod5
name: '@CorePrep/EnsurePod5'
version: '4.015'
-
class: Pod::Weaver::Plugin::H1Nester
name: '@CorePrep/H1Nester'
version: '4.015'
-
class: Pod::Weaver::Plugin::SingleEncoding
name: '@Default/SingleEncoding'
version: '4.015'
-
class: Pod::Weaver::Section::Name
name: '@Default/Name'
version: '4.015'
-
class: Pod::Weaver::Section::Version
name: '@Default/Version'
version: '4.015'
-
class: Pod::Weaver::Section::Region
name: '@Default/prelude'
version: '4.015'
-
class: Pod::Weaver::Section::Generic
name: SYNOPSIS
version: '4.015'
-
class: Pod::Weaver::Section::Generic
name: DESCRIPTION
version: '4.015'
-
class: Pod::Weaver::Section::Generic
name: OVERVIEW
version: '4.015'
-
class: Pod::Weaver::Section::Collect
name: ATTRIBUTES
version: '4.015'
-
class: Pod::Weaver::Section::Collect
name: METHODS
version: '4.015'
-
class: Pod::Weaver::Section::Collect
name: FUNCTIONS
version: '4.015'
-
class: Pod::Weaver::Section::Leftovers
name: '@Default/Leftovers'
version: '4.015'
-
class: Pod::Weaver::Section::Region
name: '@Default/postlude'
version: '4.015'
-
class: Pod::Weaver::Section::Authors
name: '@Default/Authors'
version: '4.015'
-
class: Pod::Weaver::Section::Legal
name: '@Default/Legal'
version: '4.015'
name: '@Author::OALDERS/PodWeaver'
version: '4.008'
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@Author::OALDERS/PruneCruft'
version: '6.010'
-
class: Dist::Zilla::Plugin::CopyFilesFromBuild
name: '@Author::OALDERS/CopyFilesFromBuild'
version: '0.170880'
-
class: Dist::Zilla::Plugin::GithubMeta
name: '@Author::OALDERS/GithubMeta'
version: '0.54'
-
class: Dist::Zilla::Plugin::Git::GatherDir
config:
Dist::Zilla::Plugin::GatherDir:
exclude_filename:
- Install
- LICENSE
- META.json
- Makefile.PL
- README.md
- cpanfile
exclude_match: []
follow_symlinks: 0
include_dotfiles: 0
prefix: ''
prune_directory: []
root: .
Dist::Zilla::Plugin::Git::GatherDir:
include_untracked: 0
name: '@Author::OALDERS/Git::GatherDir'
version: '2.042'
-
class: Dist::Zilla::Plugin::CopyFilesFromRelease
config:
Dist::Zilla::Plugin::CopyFilesFromRelease:
filename:
- Install
match: []
name: '@Author::OALDERS/CopyFilesFromRelease'
version: '0.006'
-
class: Dist::Zilla::Plugin::Git::Check
config:
Dist::Zilla::Plugin::Git::Check:
untracked_files: die
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty:
- Changes
- Install
- LICENSE
- META.json
- Makefile.PL
- README.md
- cpanfile
- dist.ini
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: 2.14.1
repo_root: .
name: '@Author::OALDERS/Git::Check'
version: '2.042'
-
class: Dist::Zilla::Plugin::Git::Contributors
config:
Dist::Zilla::Plugin::Git::Contributors:
git_version: 2.14.1
include_authors: 0
include_releaser: 1
order_by: name
paths: []
name: '@Author::OALDERS/Git::Contributors'
version: '0.030'
-
class: Dist::Zilla::Plugin::ReadmeAnyFromPod
config:
Dist::Zilla::Role::FileWatcher:
version: '0.006'
name: '@Author::OALDERS/ReadmeMdInBuild'
version: '0.163250'
-
class: Dist::Zilla::Plugin::ShareDir
name: '@Author::OALDERS/ShareDir'
version: '6.010'
-
class: Dist::Zilla::Plugin::TravisCI::StatusBadge
name: '@Author::OALDERS/TravisCI::StatusBadge'
version: '0.007'
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@Author::OALDERS/ConfirmRelease'
version: '6.010'
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@Author::OALDERS/UploadToCPAN'
version: '6.010'
-
class: Dist::Zilla::Plugin::RewriteVersion::Transitional
config:
Dist::Zilla::Plugin::RewriteVersion:
add_tarball_name: 0
finders:
- ':ExecFiles'
- ':InstallModules'
global: 0
skip_version_provider: 0
Dist::Zilla::Plugin::RewriteVersion::Transitional: {}
name: '@Author::OALDERS/@Git::VersionManager/RewriteVersion::Transitional'
version: '0.008'
-
class: Dist::Zilla::Plugin::MetaProvides::Update
name: '@Author::OALDERS/@Git::VersionManager/MetaProvides::Update'
version: '0.002'
-
class: Dist::Zilla::Plugin::CopyFilesFromRelease
config:
Dist::Zilla::Plugin::CopyFilesFromRelease:
filename:
- Changes
match: []
name: '@Author::OALDERS/@Git::VersionManager/CopyFilesFromRelease'
version: '0.006'
-
class: Dist::Zilla::Plugin::Git::Commit
config:
Dist::Zilla::Plugin::Git::Commit:
add_files_in: []
commit_msg: v%v%n%n%c
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty:
- Changes
- Install
- LICENSE
- META.json
- Makefile.PL
- README.md
- cpanfile
- dist.ini
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: 2.14.1
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: '@Author::OALDERS/@Git::VersionManager/release snapshot'
version: '2.042'
-
class: Dist::Zilla::Plugin::Git::Tag
config:
Dist::Zilla::Plugin::Git::Tag:
branch: ~
changelog: Changes
signed: 0
tag: v0.38
tag_format: v%v
tag_message: v%v
Dist::Zilla::Role::Git::Repo:
git_version: 2.14.1
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: '@Author::OALDERS/@Git::VersionManager/Git::Tag'
version: '2.042'
-
class: Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional
config:
Dist::Zilla::Plugin::BumpVersionAfterRelease:
finders:
- ':ExecFiles'
- ':InstallModules'
global: 0
munge_makefile_pl: 1
Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional: {}
name: '@Author::OALDERS/@Git::VersionManager/BumpVersionAfterRelease::Transitional'
version: '0.008'
-
class: Dist::Zilla::Plugin::NextRelease
name: '@Author::OALDERS/@Git::VersionManager/NextRelease'
version: '6.010'
-
class: Dist::Zilla::Plugin::Git::Commit
config:
Dist::Zilla::Plugin::Git::Commit:
add_files_in: []
commit_msg: 'increment $VERSION after %v release'
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty:
- Changes
allow_dirty_match:
- (?^:^lib/.*\.pm$)
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: 2.14.1
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: '@Author::OALDERS/@Git::VersionManager/post-release commit'
version: '2.042'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: develop
type: suggests
name: '@Author::OALDERS/@Git::VersionManager/prereqs for @Git::VersionManager'
version: '6.010'
-
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.14.1
repo_root: .
name: '@Author::OALDERS/Git::Push'
version: '2.042'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
version: '6.010'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
version: '6.010'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
version: '6.010'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExtraTestFiles'
version: '6.010'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
version: '6.010'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':PerlExecFiles'
version: '6.010'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
version: '6.010'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
version: '6.010'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':AllFiles'
version: '6.010'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':NoFiles'
version: '6.010'
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: '0'
version: '6.010'
x_contributors:
- 'Chia-liang Kao '
- 'moznion '
- 'Olaf Alders '
- 'Shin Kojima '
- 'Tadeusz Sośnierz '
- 'tokuhirom '
x_serialization_backend: 'YAML::Tiny version 1.70'
Test-WWW-Mechanize-PSGI-0.38/perlcriticrc 000644 000765 000024 00000004405 13205615472 020212 0 ustar 00olaf staff 000000 000000 severity = 3
verbose = 11
theme = core + pbp + bugs + maintenance + cosmetic + complexity + security + tests + moose
exclude = Subroutines::ProhibitCallsToUndeclaredSubs
[BuiltinFunctions::ProhibitStringySplit]
severity = 3
[CodeLayout::RequireTrailingCommas]
severity = 3
[ControlStructures::ProhibitCStyleForLoops]
severity = 3
[InputOutput::RequireCheckedSyscalls]
functions = :builtins
exclude_functions = sleep
severity = 3
[Moose::RequireCleanNamespace]
modules = Moose Moose::Role MooseX::Role::Parameterized Moose::Util::TypeConstraints
cleaners = namespace::autoclean
[NamingConventions::Capitalization]
package_exemptions = [A-Z]\w+|minFraud
file_lexical_variables = [A-Z]\w+|[^A-Z]+
global_variables = :starts_with_upper
scoped_lexical_variables = [A-Z]\w+|[^A-Z]+
severity = 3
# Given our code base, leaving this at 5 would be a huge pain
[Subroutines::ProhibitManyArgs]
max_arguments = 10
[RegularExpressions::ProhibitComplexRegexes]
max_characters = 200
[RegularExpressions::ProhibitUnusualDelimiters]
severity = 3
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build)\w+
skip_when_using = Moo::Role Moose::Role MooseX::Role::Parameterized Role::Tiny Test::Class::Moose::Role
[TestingAndDebugging::ProhibitNoWarnings]
allow = redefine
[ValuesAndExpressions::ProhibitEmptyQuotes]
severity = 3
[ValuesAndExpressions::ProhibitInterpolationOfLiterals]
severity = 3
[ValuesAndExpressions::RequireUpperCaseHeredocTerminator]
severity = 3
[Variables::ProhibitPackageVars]
add_packages = Test::Builder
[TestingAndDebugging::RequireUseStrict]
[TestingAndDebugging::RequireUseWarnings]
[-ControlStructures::ProhibitCascadingIfElse]
[-ErrorHandling::RequireCarping]
[-InputOutput::RequireBriefOpen]
[-ValuesAndExpressions::ProhibitConstantPragma]
# No need for /xsm everywhere
[-RegularExpressions::RequireDotMatchAnything]
[-RegularExpressions::RequireExtendedFormatting]
[-RegularExpressions::RequireLineBoundaryMatching]
[-Subroutines::ProhibitExplicitReturnUndef]
# http://stackoverflow.com/questions/2275317/why-does-perlcritic-dislike-using-shift-to-populate-subroutine-variables
[-Subroutines::RequireArgUnpacking]
[-Subroutines::RequireFinalReturn]
# "use v5.14" is more readable than "use 5.014"
[-ValuesAndExpressions::ProhibitVersionStrings]
Test-WWW-Mechanize-PSGI-0.38/perltidyrc 000644 000765 000024 00000000330 13205615472 017677 0 ustar 00olaf staff 000000 000000 --blank-lines-before-packages=0
--iterations=2
--no-outdent-long-comments
-b
-bar
-boc
-ci=4
-i=4
-l=78
-nolq
-se
-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="
Test-WWW-Mechanize-PSGI-0.38/README.md 000644 000765 000024 00000031223 13205615472 017057 0 ustar 00olaf staff 000000 000000 # NAME
Test::WWW::Mechanize::PSGI - Test PSGI programs using WWW::Mechanize
# VERSION
version 0.38
# SYNOPSIS
# We're in a t/*.t test script...
use Test::WWW::Mechanize::PSGI;
my $mech = Test::WWW::Mechanize::PSGI->new(
app => sub {
my $env = shift;
return [
200,
[ 'Content-Type' => 'text/html' ],
[ 'HiHello World'
]
];
},
);
$mech->get_ok('/');
is( $mech->ct, 'text/html', 'Is text/html' );
$mech->title_is('Hi');
$mech->content_contains('Hello World');
# ... and all other Test::WWW::Mechanize methods
# DESCRIPTION
[PSGI](https://metacpan.org/pod/PSGI) is a specification to decouple web server environments from
web application framework code. [Test::WWW::Mechanize](https://metacpan.org/pod/Test::WWW::Mechanize) is a subclass
of [WWW::Mechanize](https://metacpan.org/pod/WWW::Mechanize) that incorporates features for web application
testing. The [Test::WWW::Mechanize::PSGI](https://metacpan.org/pod/Test::WWW::Mechanize::PSGI) module meshes the two to
allow easy testing of [PSGI](https://metacpan.org/pod/PSGI) applications.
Testing web applications has always been a bit tricky, normally
requiring starting a web server for your application and making real HTTP
requests to it. This module allows you to test [PSGI](https://metacpan.org/pod/PSGI) web
applications but does not require a server or issue HTTP
requests. Instead, it passes the HTTP request object directly to
[PSGI](https://metacpan.org/pod/PSGI). Thus you do not need to use a real hostname:
"http://localhost/" will do. However, this is optional. The following
two lines of code do exactly the same thing:
$mech->get_ok('/action');
$mech->get_ok('http://localhost/action');
This makes testing fast and easy. [Test::WWW::Mechanize](https://metacpan.org/pod/Test::WWW::Mechanize) provides
functions for common web testing scenarios. For example:
$mech->get_ok( $page );
$mech->title_is( "Invoice Status", "Make sure we're on the invoice page" );
$mech->content_contains( "Andy Lester", "My name somewhere" );
$mech->content_like( qr/(cpan|perl)\.org/, "Link to perl.org or CPAN" );
An alternative to this module is [Plack::Test](https://metacpan.org/pod/Plack::Test).
# CONSTRUCTOR
## new
Behaves like, and calls, [WWW::Mechanize](https://metacpan.org/pod/WWW::Mechanize)'s `new` method. You should pass
in your application:
my $mech = Test::WWW::Mechanize::PSGI->new(
app => sub {
my $env = shift;
return [ 200, [ 'Content-Type' => 'text/plain' ], ['Hello World'] ],;
},
);
# METHODS: HTTP VERBS
## $mech->get\_ok($url, \[ \\%LWP\_options ,\] $desc)
A wrapper around WWW::Mechanize's get(), with similar options, except
the second argument needs to be a hash reference, not a hash. Like
well-behaved `*_ok()` functions, it returns true if the test passed,
or false if not.
A default description of "GET $url" is used if none if provided.
## $mech->head\_ok($url, \[ \\%LWP\_options ,\] $desc)
A wrapper around WWW::Mechanize's head(), with similar options, except
the second argument needs to be a hash reference, not a hash. Like
well-behaved `*_ok()` functions, it returns true if the test passed,
or false if not.
A default description of "HEAD $url" is used if none if provided.
## $mech->post\_ok( $url, \[ \\%LWP\_options ,\] $desc )
A wrapper around WWW::Mechanize's post(), with similar options, except
the second argument needs to be a hash reference, not a hash. Like
well-behaved `*_ok()` functions, it returns true if the test passed,
or false if not.
A default description of "POST to $url" is used if none if provided.
## $mech->put\_ok( $url, \[ \\%LWP\_options ,\] $desc )
A wrapper around WWW::Mechanize's put(), with similar options, except
the second argument needs to be a hash reference, not a hash. Like
well-behaved `*_ok()` functions, it returns true if the test passed,
or false if not.
A default description of "PUT to $url" is used if none if provided.
## $mech->submit\_form\_ok( \\%params \[, $desc\] )
Makes a `submit_form()` call and executes tests on the results.
The form must be found, and then submitted successfully. Otherwise,
this test fails.
_%params_ is a hashref containing the params to pass to `submit_form()`.
Note that the params to `submit_form()` are a hash whereas the params to
this function are a hashref. You have to call this function like:
$agent->submit_form_ok({
form_number => 3,
fields => {
username => 'mungo',
password => 'lost-and-alone',
}
}, "looking for 3rd form" );
As with other test functions, `$desc` is optional. If it is supplied
then it will display when running the test harness in verbose mode.
Returns true value if the specified link was found and followed
successfully. The [HTTP::Response](https://metacpan.org/pod/HTTP::Response) object returned by submit\_form()
is not available.
## $mech->follow\_link\_ok( \\%params \[, $desc\] )
Makes a `follow_link()` call and executes tests on the results.
The link must be found, and then followed successfully. Otherwise,
this test fails.
_%params_ is a hashref containing the params to pass to `follow_link()`.
Note that the params to `follow_link()` are a hash whereas the params to
this function are a hashref. You have to call this function like:
$mech->follow_link_ok( {n=>3}, "looking for 3rd link" );
As with other test functions, `$desc` is optional. If it is supplied
then it will display when running the test harness in verbose mode.
Returns a true value if the specified link was found and followed
successfully. The [HTTP::Response](https://metacpan.org/pod/HTTP::Response) object returned by follow\_link()
is not available.
## click\_ok( $button\[, $desc\] )
Clicks the button named by `$button`. An optional `$desc` can
be given for the test.
# METHODS: CONTENT CHECKING
## $mech->html\_lint\_ok( \[$desc\] )
Checks the validity of the HTML on the current page. If the page is not
HTML, then it fails. The URI is automatically appended to the _$desc_.
Note that HTML::Lint must be installed for this to work. Otherwise,
it will blow up.
## $mech->title\_is( $str \[, $desc \] )
Tells if the title of the page is the given string.
$mech->title_is( "Invoice Summary" );
## $mech->title\_like( $regex \[, $desc \] )
Tells if the title of the page matches the given regex.
$mech->title_like( qr/Invoices for (.+)/
## $mech->title\_unlike( $regex \[, $desc \] )
Tells if the title of the page matches the given regex.
$mech->title_unlike( qr/Invoices for (.+)/
## $mech->base\_is( $str \[, $desc \] )
Tells if the base of the page is the given string.
$mech->base_is( "http://example.com/" );
## $mech->base\_like( $regex \[, $desc \] )
Tells if the base of the page matches the given regex.
$mech->base_like( qr{http://example.com/index.php?PHPSESSID=(.+)});
## $mech->base\_unlike( $regex \[, $desc \] )
Tells if the base of the page matches the given regex.
$mech->base_unlike( qr{http://example.com/index.php?PHPSESSID=(.+)});
## $mech->content\_is( $str \[, $desc \] )
Tells if the content of the page matches the given string
## $mech->content\_contains( $str \[, $desc \] )
Tells if the content of the page contains _$str_.
## $mech->content\_lacks( $str \[, $desc \] )
Tells if the content of the page lacks _$str_.
## $mech->content\_like( $regex \[, $desc \] )
Tells if the content of the page matches _$regex_.
## $mech->content\_unlike( $regex \[, $desc \] )
Tells if the content of the page does NOT match _$regex_.
## $mech->has\_tag( $tag, $text \[, $desc \] )
Tells if the page has a `$tag` tag with the given content in its text.
## $mech->has\_tag\_like( $tag, $regex \[, $desc \] )
Tells if the page has a `$tag` tag with the given content in its text.
## $mech->followable\_links()
Returns a list of links that [WWW::Mechanize](https://metacpan.org/pod/WWW::Mechanize) can follow. This is only http
and https links.
## $mech->page\_links\_ok( \[ $desc \] )
Follow all links on the current page and test for HTTP status 200
$mech->page_links_ok('Check all links');
## $mech->page\_links\_content\_like( $regex \[, $desc \] )
Follow all links on the current page and test their contents for _$regex_.
$mech->page_links_content_like( qr/foo/,
'Check all links contain "foo"' );
## $mech->links\_ok( $links \[, $desc \] )
Follow specified links on the current page and test for HTTP status
200\. The links may be specified as a reference to an array containing
[WWW::Mechanize::Link](https://metacpan.org/pod/WWW::Mechanize::Link) objects, an array of URLs, or a scalar URL
name.
my @links = $mech->find_all_links( url_regex => qr/cnn\.com$/ );
$mech->links_ok( \@links, 'Check all links for cnn.com' );
my @links = qw( index.html search.html about.html );
$mech->links_ok( \@links, 'Check main links' );
$mech->links_ok( 'index.html', 'Check link to index' );
## $mech->link\_status\_is( $links, $status \[, $desc \] )
Follow specified links on the current page and test for HTTP status
passed. The links may be specified as a reference to an array
containing [WWW::Mechanize::Link](https://metacpan.org/pod/WWW::Mechanize::Link) objects, an array of URLs, or a
scalar URL name.
my @links = $mech->followable_links();
$mech->link_status_is( \@links, 403,
'Check all links are restricted' );
## $mech->link\_status\_isnt( $links, $status \[, $desc \] )
Follow specified links on the current page and test for HTTP status
passed. The links may be specified as a reference to an array
containing [WWW::Mechanize::Link](https://metacpan.org/pod/WWW::Mechanize::Link) objects, an array of URLs, or a
scalar URL name.
my @links = $mech->followable_links();
$mech->link_status_isnt( \@links, 404,
'Check all links are not 404' );
## $mech->link\_content\_like( $links, $regex \[, $desc \] )
Follow specified links on the current page and test the resulting
content of each against _$regex_. The links may be specified as a
reference to an array containing [WWW::Mechanize::Link](https://metacpan.org/pod/WWW::Mechanize::Link) objects, an
array of URLs, or a scalar URL name.
my @links = $mech->followable_links();
$mech->link_content_like( \@links, qr/Restricted/,
'Check all links are restricted' );
## $mech->link\_content\_unlike( $links, $regex \[, $desc \] )
Follow specified links on the current page and test that the resulting
content of each does not match _$regex_. The links may be specified as a
reference to an array containing [WWW::Mechanize::Link](https://metacpan.org/pod/WWW::Mechanize::Link) objects, an array
of URLs, or a scalar URL name.
my @links = $mech->followable_links();
$mech->link_content_unlike( \@links, qr/Restricted/,
'No restricted links' );
## $mech->stuff\_inputs( \[\\%options\] )
Finds all free-text input fields (text, textarea, and password) in the
current form and fills them to their maximum length in hopes of finding
application code that can't handle it. Fields with no maximum length
and all textarea fields are set to 66000 bytes, which will often be
enough to overflow the data's eventual receptacle.
There is no return value.
If there is no current form then nothing is done.
The hashref $options can contain the following keys:
- ignore
hash value is arrayref of field names to not touch, e.g.:
$mech->stuff_inputs( {
ignore => [qw( specialfield1 specialfield2 )],
} );
- fill
hash value is default string to use when stuffing fields. Copies
of the string are repeated up to the max length of each field. E.g.:
$mech->stuff_inputs( {
fill => '@' # stuff all fields with something easy to recognize
} );
- specs
hash value is arrayref of hashrefs with which you can pass detailed
instructions about how to stuff a given field. E.g.:
$mech->stuff_inputs( {
specs=>{
# Some fields are datatype-constrained. It's most common to
# want the field stuffed with valid data.
widget_quantity => { fill=>'9' },
notes => { maxlength=>2000 },
}
} );
The specs allowed are _fill_ (use this fill for the field rather than
the default) and _maxlength_ (use this as the field's maxlength instead
of any maxlength specified in the HTML).
# AUTHOR
Leon Brocard
# COPYRIGHT AND LICENSE
This software is copyright (c) 2009 by Leon Brocard.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
Test-WWW-Mechanize-PSGI-0.38/t/ 000755 000765 000024 00000000000 13205615472 016042 5 ustar 00olaf staff 000000 000000 Test-WWW-Mechanize-PSGI-0.38/tidyall.ini 000644 000765 000024 00000000465 13205615472 017747 0 ustar 00olaf staff 000000 000000 [PerlTidy]
select = **/*.{pl,pm,t,psgi}
ignore = .build/**/*
ignore = Test-WWW-Mechanize-PSGI-*/**/*
ignore = blib/**/*
ignore = t/00-*
ignore = t/author-*
ignore = t/release-*
ignore = t/zzz-*
ignore = xt/**/*
argv = --profile=$ROOT/perltidyrc
[SortLines::Naturally]
select = .gitignore
select = .stopwords
Test-WWW-Mechanize-PSGI-0.38/xt/ 000755 000765 000024 00000000000 13205615472 016232 5 ustar 00olaf staff 000000 000000 Test-WWW-Mechanize-PSGI-0.38/xt/author/ 000755 000765 000024 00000000000 13205615472 017534 5 ustar 00olaf staff 000000 000000 Test-WWW-Mechanize-PSGI-0.38/xt/release/ 000755 000765 000024 00000000000 13205615472 017652 5 ustar 00olaf staff 000000 000000 Test-WWW-Mechanize-PSGI-0.38/xt/release/cpan-changes.t 000644 000765 000024 00000000344 13205615472 022367 0 ustar 00olaf staff 000000 000000 use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::CPAN::Changes 0.012
use Test::More 0.96 tests => 1;
use Test::CPAN::Changes;
subtest 'changes_ok' => sub {
changes_file_ok('Changes');
};
Test-WWW-Mechanize-PSGI-0.38/xt/author/pod-coverage.t 000644 000765 000024 00000000334 13205615472 022274 0 ustar 00olaf staff 000000 000000 #!perl
# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests.
use Test::Pod::Coverage 1.08;
use Pod::Coverage::TrustPod;
all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
Test-WWW-Mechanize-PSGI-0.38/xt/author/pod-spell.t 000644 000765 000024 00000000610 13205615472 021615 0 ustar 00olaf staff 000000 000000 use strict;
use warnings;
use Test::More;
# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007004
use Test::Spelling 0.12;
use Pod::Wordlist;
add_stopwords();
all_pod_files_spelling_ok( qw( bin lib ) );
__DATA__
Alders
Alders'
Brocard
Chia
Kao
Kojima
Leon
Mechanize
Olaf
PSGI
Shin
Sośnierz
Tadeusz
Test
WWW
acme
clkao
lib
maxlength
moznion
olaf
params
shin
tadeusz
tokuhirom
Test-WWW-Mechanize-PSGI-0.38/xt/author/synopsis.t 000644 000765 000024 00000000060 13205615472 021604 0 ustar 00olaf staff 000000 000000 #!perl
use Test::Synopsis;
all_synopsis_ok();
Test-WWW-Mechanize-PSGI-0.38/xt/author/tidyall.t 000644 000765 000024 00000000522 13205615472 021362 0 ustar 00olaf staff 000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Test::TidyAll v$VERSION
use Test::More 0.88;
use Test::Code::TidyAll 0.24;
tidyall_ok(
verbose => ( exists $ENV{TEST_TIDYALL_VERBOSE} ? $ENV{TEST_TIDYALL_VERBOSE} : 0 ),
jobs => ( exists $ENV{TEST_TIDYALL_JOBS} ? $ENV{TEST_TIDYALL_JOBS} : 1 ),
);
done_testing;
Test-WWW-Mechanize-PSGI-0.38/t/00-report-prereqs.dd 000644 000765 000024 00000005432 13205615472 021566 0 ustar 00olaf staff 000000 000000 do { my $x = {
'configure' => {
'requires' => {
'ExtUtils::MakeMaker' => '0',
'perl' => '5.006'
},
'suggests' => {
'JSON::PP' => '2.27300'
}
},
'develop' => {
'requires' => {
'Pod::Coverage::TrustPod' => '0',
'Pod::Wordlist' => '0',
'Test::CPAN::Changes' => '0.19',
'Test::Code::TidyAll' => '0.50',
'Test::More' => '0.96',
'Test::Pod::Coverage' => '1.08',
'Test::Spelling' => '0.12',
'Test::Synopsis' => '0'
},
'suggests' => {
'Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional' => '0.004',
'Dist::Zilla::Plugin::CopyFilesFromRelease' => '0',
'Dist::Zilla::Plugin::Git::Commit' => '2.020',
'Dist::Zilla::Plugin::Git::Tag' => '0',
'Dist::Zilla::Plugin::NextRelease' => '5.033',
'Dist::Zilla::Plugin::RewriteVersion::Transitional' => '0.004'
}
},
'runtime' => {
'requires' => {
'Carp' => '0',
'HTTP::Message::PSGI' => '0',
'Test::WWW::Mechanize' => '0',
'Try::Tiny' => '0',
'base' => '0',
'perl' => '5.006',
'strict' => '0',
'warnings' => '0'
}
},
'test' => {
'recommends' => {
'CPAN::Meta' => '2.120900'
},
'requires' => {
'CGI::Cookie' => '0',
'ExtUtils::MakeMaker' => '0',
'File::Spec' => '0',
'Test::More' => '0',
'perl' => '5.006'
}
}
};
$x;
} Test-WWW-Mechanize-PSGI-0.38/t/00-report-prereqs.t 000644 000765 000024 00000013426 13205615472 021444 0 ustar 00olaf staff 000000 000000 #!perl
use strict;
use warnings;
# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027
use Test::More tests => 1;
use ExtUtils::MakeMaker;
use File::Spec;
# from $version::LAX
my $lax_version_re =
qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )?
|
(?:\.[0-9]+) (?:_[0-9]+)?
) | (?:
v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )?
|
(?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)?
)
)/x;
# hide optional CPAN::Meta modules from prereq scanner
# and check if they are available
my $cpan_meta = "CPAN::Meta";
my $cpan_meta_pre = "CPAN::Meta::Prereqs";
my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic
# Verify requirements?
my $DO_VERIFY_PREREQS = 1;
sub _max {
my $max = shift;
$max = ( $_ > $max ) ? $_ : $max for @_;
return $max;
}
sub _merge_prereqs {
my ($collector, $prereqs) = @_;
# CPAN::Meta::Prereqs object
if (ref $collector eq $cpan_meta_pre) {
return $collector->with_merged_prereqs(
CPAN::Meta::Prereqs->new( $prereqs )
);
}
# Raw hashrefs
for my $phase ( keys %$prereqs ) {
for my $type ( keys %{ $prereqs->{$phase} } ) {
for my $module ( keys %{ $prereqs->{$phase}{$type} } ) {
$collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module};
}
}
}
return $collector;
}
my @include = qw(
);
my @exclude = qw(
);
# Add static prereqs to the included modules list
my $static_prereqs = do './t/00-report-prereqs.dd';
# Merge all prereqs (either with ::Prereqs or a hashref)
my $full_prereqs = _merge_prereqs(
( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ),
$static_prereqs
);
# Add dynamic prereqs to the included modules list (if we can)
my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml';
my $cpan_meta_error;
if ( $source && $HAS_CPAN_META
&& (my $meta = eval { CPAN::Meta->load_file($source) } )
) {
$full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs);
}
else {
$cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source)
$source = 'static metadata';
}
my @full_reports;
my @dep_errors;
my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs;
# Add static includes into a fake section
for my $mod (@include) {
$req_hash->{other}{modules}{$mod} = 0;
}
for my $phase ( qw(configure build test runtime develop other) ) {
next unless $req_hash->{$phase};
next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING});
for my $type ( qw(requires recommends suggests conflicts modules) ) {
next unless $req_hash->{$phase}{$type};
my $title = ucfirst($phase).' '.ucfirst($type);
my @reports = [qw/Module Want Have/];
for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) {
next if $mod eq 'perl';
next if grep { $_ eq $mod } @exclude;
my $file = $mod;
$file =~ s{::}{/}g;
$file .= ".pm";
my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC;
my $want = $req_hash->{$phase}{$type}{$mod};
$want = "undef" unless defined $want;
$want = "any" if !$want && $want == 0;
my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required";
if ($prefix) {
my $have = MM->parse_version( File::Spec->catfile($prefix, $file) );
$have = "undef" unless defined $have;
push @reports, [$mod, $want, $have];
if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) {
if ( $have !~ /\A$lax_version_re\z/ ) {
push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)";
}
elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) {
push @dep_errors, "$mod version '$have' is not in required range '$want'";
}
}
}
else {
push @reports, [$mod, $want, "missing"];
if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) {
push @dep_errors, "$mod is not installed ($req_string)";
}
}
}
if ( @reports ) {
push @full_reports, "=== $title ===\n\n";
my $ml = _max( map { length $_->[0] } @reports );
my $wl = _max( map { length $_->[1] } @reports );
my $hl = _max( map { length $_->[2] } @reports );
if ($type eq 'modules') {
splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl];
push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports;
}
else {
splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl];
push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports;
}
push @full_reports, "\n";
}
}
}
if ( @full_reports ) {
diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports;
}
if ( $cpan_meta_error || @dep_errors ) {
diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n";
}
if ( $cpan_meta_error ) {
my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml';
diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n";
}
if ( @dep_errors ) {
diag join("\n",
"\nThe following REQUIRED prerequisites were not satisfied:\n",
@dep_errors,
"\n"
);
}
pass;
# vim: ts=4 sts=4 sw=4 et:
Test-WWW-Mechanize-PSGI-0.38/t/cookie.t 000644 000765 000024 00000002010 13205615472 017471 0 ustar 00olaf staff 000000 000000 #!perl
use strict;
use warnings;
use Test::More tests => 4;
use Test::WWW::Mechanize::PSGI;
use CGI::Cookie;
my $hello = Test::WWW::Mechanize::PSGI->new(
app => do {
my $cookie_store = {};
my $sid = 123456;
sub {
my $env = shift;
my %cookies = CGI::Cookie->parse( $env->{HTTP_COOKIE} || '' );
if ( my $cookie = $cookies{sid} ) {
my $content = $cookie_store->{ $cookies{sid}->value };
return [
200, [ 'Set-Cookie' => "sid=$sid; path=/" ],
[$content]
],
;
}
else {
$cookie_store->{$sid} = "OK";
return [
200, [ 'Set-Cookie' => "sid=$sid; path=/" ],
['Hello World']
],
;
}
}
},
);
$hello->get_ok('/');
$hello->content_is('Hello World');
$hello->get_ok('/');
$hello->content_is('OK');
Test-WWW-Mechanize-PSGI-0.38/t/handlers.t 000644 000765 000024 00000002242 13205615472 020027 0 ustar 00olaf staff 000000 000000 #!perl
#
use strict;
use warnings;
use Test::More;
use Test::WWW::Mechanize::PSGI;
my $ua = Test::WWW::Mechanize::PSGI->new(
app => sub {
my $env = shift;
return [ 200, [ 'Content-Type' => 'text/plain' ], ['Hello World'] ],;
},
);
my @phases = (
'request_preprepare',
'request_prepare',
'request_send',
'response_header',
'response_data',
'response_done',
'response_redirect',
);
my $slot = 0;
for my $phase (@phases) {
$ua->add_handler(
$phase => sub {
$ENV{ phase_to_env($phase) } = $slot;
$slot++;
return undef;
}
);
}
for my $phase (@phases) {
my $var = phase_to_env($phase);
ok( !exists $ENV{ phase_to_env($phase) }, "handler $phase not yet run" );
}
$ua->get_ok('/');
for my $phase (@phases) {
subtest $phase => sub {
my $name = phase_to_env($phase);
ok( exists $ENV{$name}, 'handler fired' );
my $slot = $ENV{$name};
is(
$phase, $phases[$slot],
'handler fired in correct order'
);
};
}
sub phase_to_env {
my $phase = shift;
return 'LWP_' . uc($phase);
}
done_testing();
Test-WWW-Mechanize-PSGI-0.38/t/pod.t 000644 000765 000024 00000000220 13205615472 017003 0 ustar 00olaf staff 000000 000000 #!perl -T
use Test::More;
eval "use Test::Pod 1.14";
plan skip_all => "Test::Pod 1.14 required for testing POD: $@" if $@;
all_pod_files_ok();
Test-WWW-Mechanize-PSGI-0.38/t/simple.t 000644 000765 000024 00000003050 13205615472 017516 0 ustar 00olaf staff 000000 000000 #!perl
use strict;
use warnings;
use Test::More;
use Test::WWW::Mechanize::PSGI;
my $hello = Test::WWW::Mechanize::PSGI->new(
app => sub {
my $env = shift;
return [ 200, [ 'Content-Type' => 'text/plain' ], ['Hello World'] ],;
},
);
isa_ok( $hello, 'Test::WWW::Mechanize::PSGI' );
$hello->get_ok('/');
is( $hello->ct, 'text/plain', 'Is text/plain' );
$hello->content_contains('Hello World');
my $html = Test::WWW::Mechanize::PSGI->new(
app => sub {
my $env = shift;
return [
200,
[ 'Content-Type' => 'text/html' ],
[
'HiHello World'
]
];
},
);
isa_ok( $html, 'Test::WWW::Mechanize::PSGI' );
$html->get_ok('/');
is( $html->ct, 'text/html', 'Is text/html' );
$html->title_is('Hi');
$html->content_contains('Hello World');
my $die = Test::WWW::Mechanize::PSGI->new(
app => sub {
my $env = shift;
die "Throwing an exception from app handler. Server shouldn't crash.";
},
);
isa_ok( $die, 'Test::WWW::Mechanize::PSGI' );
$die->get;
my $base = 'https://metacpan.org/foo/bar';
my $base_href = Test::WWW::Mechanize::PSGI->new(
app => sub {
my $env = shift;
return [
200, [ 'Content-Type' => 'text/html' ],
[
qq[HiHello World]
]
];
}
);
my $res = $base_href->get('/');
is( $base_href->base, $base );
done_testing();
Test-WWW-Mechanize-PSGI-0.38/lib/Test/ 000755 000765 000024 00000000000 13205615472 017264 5 ustar 00olaf staff 000000 000000 Test-WWW-Mechanize-PSGI-0.38/lib/Test/WWW/ 000755 000765 000024 00000000000 13205615472 017750 5 ustar 00olaf staff 000000 000000 Test-WWW-Mechanize-PSGI-0.38/lib/Test/WWW/Mechanize/ 000755 000765 000024 00000000000 13205615472 021653 5 ustar 00olaf staff 000000 000000 Test-WWW-Mechanize-PSGI-0.38/lib/Test/WWW/Mechanize/PSGI.pm 000644 000765 000024 00000034343 13205615472 022762 0 ustar 00olaf staff 000000 000000 package Test::WWW::Mechanize::PSGI;
use strict;
use warnings;
our $VERSION = '0.38';
use Carp qw( confess );
use HTTP::Message::PSGI (); # adds from_psgi() to HTTP::Response
use Try::Tiny qw( catch try );
use base 'Test::WWW::Mechanize';
my $Test = Test::Builder->new();
sub new {
my $class = shift;
my %args = @_;
# Dont let LWP complain about options for our attributes
my $app = $args{app};
delete $args{app};
confess('Missing argument app') unless $app;
confess('Argument app should be a code reference')
unless ref($app) && ref($app) eq 'CODE';
my $self = $class->SUPER::new(%args);
$self->{app} = $app;
return $self;
}
sub simple_request {
my ( $self, $request ) = @_;
my $uri = $request->uri;
$uri->scheme('http') unless defined $uri->scheme;
$uri->host('localhost') unless defined $uri->host;
my $env = $self->prepare_request($request)->to_psgi;
$self->run_handlers( 'request_send', $request );
my $response;
try {
$response = HTTP::Response->from_psgi( $self->{app}->($env) );
}
catch {
$Test->diag("PSGI error: $_");
$response = HTTP::Response->new(500);
$response->content($_);
$response->content_type(q{});
};
$response->request($request);
# Trigger set_my_handler call in LWP::UserAgent::parse_head()
$self->run_handlers( 'response_header', $response );
# Running the reponse_data handlers via run_handlers() doesn't pass all of
# the args that are required, so we'll run each handler explicitly. We do
# this here so that we can fire off the handler which gets added in
# LWP::UserAgent::parse_head(). Without this handler firing,
# LWP::UserAgent::base() will not know about any URL which may have been
# set in a tag. If we don't know about this tag then we
# may end up with an incorrect base URL and, by extension, we could end up
# at the wrong location when trying to follow relative URLs.
for my $handler ( $self->handlers( 'response_data', $response ) ) {
$handler->{callback}
->( $response, $self, $handler, $response->content );
}
$self->run_handlers( 'response_done', $response );
return $response;
}
1;
=pod
=encoding UTF-8
=head1 NAME
Test::WWW::Mechanize::PSGI - Test PSGI programs using WWW::Mechanize
=head1 VERSION
version 0.38
=head1 SYNOPSIS
# We're in a t/*.t test script...
use Test::WWW::Mechanize::PSGI;
my $mech = Test::WWW::Mechanize::PSGI->new(
app => sub {
my $env = shift;
return [
200,
[ 'Content-Type' => 'text/html' ],
[ 'HiHello World'
]
];
},
);
$mech->get_ok('/');
is( $mech->ct, 'text/html', 'Is text/html' );
$mech->title_is('Hi');
$mech->content_contains('Hello World');
# ... and all other Test::WWW::Mechanize methods
=head1 DESCRIPTION
L is a specification to decouple web server environments from
web application framework code. L is a subclass
of L that incorporates features for web application
testing. The L module meshes the two to
allow easy testing of L applications.
Testing web applications has always been a bit tricky, normally
requiring starting a web server for your application and making real HTTP
requests to it. This module allows you to test L web
applications but does not require a server or issue HTTP
requests. Instead, it passes the HTTP request object directly to
L. Thus you do not need to use a real hostname:
"http://localhost/" will do. However, this is optional. The following
two lines of code do exactly the same thing:
$mech->get_ok('/action');
$mech->get_ok('http://localhost/action');
This makes testing fast and easy. L provides
functions for common web testing scenarios. For example:
$mech->get_ok( $page );
$mech->title_is( "Invoice Status", "Make sure we're on the invoice page" );
$mech->content_contains( "Andy Lester", "My name somewhere" );
$mech->content_like( qr/(cpan|perl)\.org/, "Link to perl.org or CPAN" );
An alternative to this module is L.
=head1 CONSTRUCTOR
=head2 new
Behaves like, and calls, L's C method. You should pass
in your application:
my $mech = Test::WWW::Mechanize::PSGI->new(
app => sub {
my $env = shift;
return [ 200, [ 'Content-Type' => 'text/plain' ], ['Hello World'] ],;
},
);
=head1 METHODS: HTTP VERBS
=head2 $mech->get_ok($url, [ \%LWP_options ,] $desc)
A wrapper around WWW::Mechanize's get(), with similar options, except
the second argument needs to be a hash reference, not a hash. Like
well-behaved C<*_ok()> functions, it returns true if the test passed,
or false if not.
A default description of "GET $url" is used if none if provided.
=head2 $mech->head_ok($url, [ \%LWP_options ,] $desc)
A wrapper around WWW::Mechanize's head(), with similar options, except
the second argument needs to be a hash reference, not a hash. Like
well-behaved C<*_ok()> functions, it returns true if the test passed,
or false if not.
A default description of "HEAD $url" is used if none if provided.
=head2 $mech->post_ok( $url, [ \%LWP_options ,] $desc )
A wrapper around WWW::Mechanize's post(), with similar options, except
the second argument needs to be a hash reference, not a hash. Like
well-behaved C<*_ok()> functions, it returns true if the test passed,
or false if not.
A default description of "POST to $url" is used if none if provided.
=head2 $mech->put_ok( $url, [ \%LWP_options ,] $desc )
A wrapper around WWW::Mechanize's put(), with similar options, except
the second argument needs to be a hash reference, not a hash. Like
well-behaved C<*_ok()> functions, it returns true if the test passed,
or false if not.
A default description of "PUT to $url" is used if none if provided.
=head2 $mech->submit_form_ok( \%params [, $desc] )
Makes a C call and executes tests on the results.
The form must be found, and then submitted successfully. Otherwise,
this test fails.
I<%params> is a hashref containing the params to pass to C.
Note that the params to C are a hash whereas the params to
this function are a hashref. You have to call this function like:
$agent->submit_form_ok({
form_number => 3,
fields => {
username => 'mungo',
password => 'lost-and-alone',
}
}, "looking for 3rd form" );
As with other test functions, C<$desc> is optional. If it is supplied
then it will display when running the test harness in verbose mode.
Returns true value if the specified link was found and followed
successfully. The L object returned by submit_form()
is not available.
=head2 $mech->follow_link_ok( \%params [, $desc] )
Makes a C call and executes tests on the results.
The link must be found, and then followed successfully. Otherwise,
this test fails.
I<%params> is a hashref containing the params to pass to C.
Note that the params to C are a hash whereas the params to
this function are a hashref. You have to call this function like:
$mech->follow_link_ok( {n=>3}, "looking for 3rd link" );
As with other test functions, C<$desc> is optional. If it is supplied
then it will display when running the test harness in verbose mode.
Returns a true value if the specified link was found and followed
successfully. The L object returned by follow_link()
is not available.
=head2 click_ok( $button[, $desc] )
Clicks the button named by C<$button>. An optional C<$desc> can
be given for the test.
=head1 METHODS: CONTENT CHECKING
=head2 $mech->html_lint_ok( [$desc] )
Checks the validity of the HTML on the current page. If the page is not
HTML, then it fails. The URI is automatically appended to the I<$desc>.
Note that HTML::Lint must be installed for this to work. Otherwise,
it will blow up.
=head2 $mech->title_is( $str [, $desc ] )
Tells if the title of the page is the given string.
$mech->title_is( "Invoice Summary" );
=head2 $mech->title_like( $regex [, $desc ] )
Tells if the title of the page matches the given regex.
$mech->title_like( qr/Invoices for (.+)/
=head2 $mech->title_unlike( $regex [, $desc ] )
Tells if the title of the page matches the given regex.
$mech->title_unlike( qr/Invoices for (.+)/
=head2 $mech->base_is( $str [, $desc ] )
Tells if the base of the page is the given string.
$mech->base_is( "http://example.com/" );
=head2 $mech->base_like( $regex [, $desc ] )
Tells if the base of the page matches the given regex.
$mech->base_like( qr{http://example.com/index.php?PHPSESSID=(.+)});
=head2 $mech->base_unlike( $regex [, $desc ] )
Tells if the base of the page matches the given regex.
$mech->base_unlike( qr{http://example.com/index.php?PHPSESSID=(.+)});
=head2 $mech->content_is( $str [, $desc ] )
Tells if the content of the page matches the given string
=head2 $mech->content_contains( $str [, $desc ] )
Tells if the content of the page contains I<$str>.
=head2 $mech->content_lacks( $str [, $desc ] )
Tells if the content of the page lacks I<$str>.
=head2 $mech->content_like( $regex [, $desc ] )
Tells if the content of the page matches I<$regex>.
=head2 $mech->content_unlike( $regex [, $desc ] )
Tells if the content of the page does NOT match I<$regex>.
=head2 $mech->has_tag( $tag, $text [, $desc ] )
Tells if the page has a C<$tag> tag with the given content in its text.
=head2 $mech->has_tag_like( $tag, $regex [, $desc ] )
Tells if the page has a C<$tag> tag with the given content in its text.
=head2 $mech->followable_links()
Returns a list of links that L can follow. This is only http
and https links.
=head2 $mech->page_links_ok( [ $desc ] )
Follow all links on the current page and test for HTTP status 200
$mech->page_links_ok('Check all links');
=head2 $mech->page_links_content_like( $regex [, $desc ] )
Follow all links on the current page and test their contents for I<$regex>.
$mech->page_links_content_like( qr/foo/,
'Check all links contain "foo"' );
=head2 $mech->links_ok( $links [, $desc ] )
Follow specified links on the current page and test for HTTP status
200. The links may be specified as a reference to an array containing
L objects, an array of URLs, or a scalar URL
name.
my @links = $mech->find_all_links( url_regex => qr/cnn\.com$/ );
$mech->links_ok( \@links, 'Check all links for cnn.com' );
my @links = qw( index.html search.html about.html );
$mech->links_ok( \@links, 'Check main links' );
$mech->links_ok( 'index.html', 'Check link to index' );
=head2 $mech->link_status_is( $links, $status [, $desc ] )
Follow specified links on the current page and test for HTTP status
passed. The links may be specified as a reference to an array
containing L objects, an array of URLs, or a
scalar URL name.
my @links = $mech->followable_links();
$mech->link_status_is( \@links, 403,
'Check all links are restricted' );
=head2 $mech->link_status_isnt( $links, $status [, $desc ] )
Follow specified links on the current page and test for HTTP status
passed. The links may be specified as a reference to an array
containing L objects, an array of URLs, or a
scalar URL name.
my @links = $mech->followable_links();
$mech->link_status_isnt( \@links, 404,
'Check all links are not 404' );
=head2 $mech->link_content_like( $links, $regex [, $desc ] )
Follow specified links on the current page and test the resulting
content of each against I<$regex>. The links may be specified as a
reference to an array containing L objects, an
array of URLs, or a scalar URL name.
my @links = $mech->followable_links();
$mech->link_content_like( \@links, qr/Restricted/,
'Check all links are restricted' );
=head2 $mech->link_content_unlike( $links, $regex [, $desc ] )
Follow specified links on the current page and test that the resulting
content of each does not match I<$regex>. The links may be specified as a
reference to an array containing L objects, an array
of URLs, or a scalar URL name.
my @links = $mech->followable_links();
$mech->link_content_unlike( \@links, qr/Restricted/,
'No restricted links' );
=head2 $mech->stuff_inputs( [\%options] )
Finds all free-text input fields (text, textarea, and password) in the
current form and fills them to their maximum length in hopes of finding
application code that can't handle it. Fields with no maximum length
and all textarea fields are set to 66000 bytes, which will often be
enough to overflow the data's eventual receptacle.
There is no return value.
If there is no current form then nothing is done.
The hashref $options can contain the following keys:
=over
=item * ignore
hash value is arrayref of field names to not touch, e.g.:
$mech->stuff_inputs( {
ignore => [qw( specialfield1 specialfield2 )],
} );
=item * fill
hash value is default string to use when stuffing fields. Copies
of the string are repeated up to the max length of each field. E.g.:
$mech->stuff_inputs( {
fill => '@' # stuff all fields with something easy to recognize
} );
=item * specs
hash value is arrayref of hashrefs with which you can pass detailed
instructions about how to stuff a given field. E.g.:
$mech->stuff_inputs( {
specs=>{
# Some fields are datatype-constrained. It's most common to
# want the field stuffed with valid data.
widget_quantity => { fill=>'9' },
notes => { maxlength=>2000 },
}
} );
The specs allowed are I (use this fill for the field rather than
the default) and I (use this as the field's maxlength instead
of any maxlength specified in the HTML).
=back
=head1 AUTHOR
Leon Brocard
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2009 by Leon Brocard.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
__END__
# ABSTRACT: Test PSGI programs using WWW::Mechanize