NAME
Test::LWP::Capture - Mock LWP requests using captured data
VERSION
Version 0.01
SYNOPSIS
In test file:
use Test::More;
use Test::LWP::Capture file => '/path/to/file';
# arbitrary code with LWP usage
or in command line:
perl -MTest::LWP::Capture=file,captured.txt ./app.pl
EXPORT
Nothing is exported.
DESCRIPTION
Distinct feautures:
- Mock LWP requests for standalone perl programs out of the box
- VCS friendly request/response dumps
ENVIRONMENT
-
PERL_TEST_LWP_CAPTURE
Request/response pairs will be recaptured if set to some true value.
-
TEST_LWP_CAPTURE_ACCEPT_REQ_HDR, TEST_LWP_CAPTURE_ACCEPT_RESP_HDR
All headers match provided regexp will be captured, for requests and responces respectively. Ignored if not defined.
-
TEST_LWP_CAPTURE_DISCARD_REQ_HDR, TEST_LWP_CAPTURE_DISCARD_RESP_HDR
All headers match provided regexp will be discarded (higher priority than according
ACCEPT
env var. For requests and responces respectively. Ignored if not defined.
AUTHOR
Michael Samoglyadov, <mixas at cpan.org>
BUGS
Please report any bugs or feature requests to bug-test-lwp-cmd at rt.cpan.org
,
or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-LWP-Capture. I will be
notified, and then you'll automatically be notified of progress on your bug as
I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Test::LWP::Capture
You can also look for information at:
-
RT: CPAN's request tracker (report bugs here)
-
AnnoCPAN: Annotated CPAN documentation
-
CPAN Ratings
-
Search CPAN
LICENSE AND COPYRIGHT
Copyright 2017 Michael Samoglyadov.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.