Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

mocks LWP::UserAgent and dispatches your requests/responses

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Build.PL
Octocat-spinner-32 Changes
Octocat-spinner-32 MANIFEST
Octocat-spinner-32 MANIFEST.SKIP
Octocat-spinner-32 README
README
NAME
       Test::Mock::LWP::Dispatch − mocks LWP::UserAgent and dispatches your
       requests/responses

SYNOPSIS
         # in your *.t
         use Test::Mock::LWP::Dispatch;
         use HTTP::Response;

         # global mappings for requests and responses for LWP::UserAgent
         $mock_ua‐>map(’http://example.com’, HTTP::Response‐>new(...));
         # or
         $mock_ua‐>map(qr!^http://example.com/page!, sub { my $request = shift;
                                                           # ... create $response
                                                           return $response; });

         # or make local mappings
         my $ua = LWP::UserAgent‐>new;
         $ua‐>map(...);

DESCRIPTION
       See Test::Mock::LWP::Dispatch POD documentation.

AUTHORS
       Yury Zavarin "yury.zavarin@gmail.com".

LICENSE
       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

SEE ALSO
       http://github.com/tadam/Test−Mock−LWP−Dispatch
       Test::Mock::LWP
       LWP::UserAgent
Something went wrong with that request. Please try again.