BSD Ports

devel/p5-Test-Mock-LWP-Dispatch 0.08 FreeBSD

Mocks LWP::UserAgent and dispatches your requests/responses

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
License
ART10, GPLv1+
Categories
devel, perl5
Package size
14.0 KiB, 48.6 KiB installed

Description

Test::Mock::LWP::Dispatch intends for testing a code that heavily uses LWP::UserAgent.

Assume that function you want to test makes three different request to the server and expects to get some content from the server. To test this function you should setup request/response mappings for mocked UserAgent and test it.

For doing something with mappings, here are methods map, unmap and unmap_all. For controlling context of these mappings (is it applies for all created in your code LWP::UserAgent's or only to one specific?) you should call these functions for exported $mock_ua object (global mapping) or for newly created LWP::UserAgent (local mappings).

See also on Test::Mock::LWP, it provides mocked LWP objects for you, so probably you can solve your problems with this module too.

In the other systems

The newest version among them is 0.08, as upstream numbers it.

SystemPortVersionVulnerabilitiesStatusMaintainerLast update
FreeBSDdevel/p5-Test-Mock-LWP-Dispatch0.08 newestnone known-[email protected]-
DragonFlydevel/p5-Test-Mock-LWP-Dispatch0.08 newestnone known-[email protected]-
HardenedBSDdevel/p5-Test-Mock-LWP-Dispatch0.08 newestno data-[email protected]-
GhostBSDdevel/p5-Test-Mock-LWP-Dispatch0.08 newestno data-[email protected]-

Install

Binary package:

pkg install p5-Test-Mock-LWP-Dispatch

From the ports tree:

cd /usr/ports/devel/p5-Test-Mock-LWP-Dispatch/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	p5-Test-Mock-LWP-Dispatch>0:devel/p5-Test-Mock-LWP-Dispatch

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest0.080.080.080.080.08
FreeBSD:14:quarterly0.080.08n/a0.080.08
FreeBSD:15:latest0.080.08n/a0.080.08
FreeBSD:15:quarterly0.080.08n/an/an/a
FreeBSD:16:latest0.080.08n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependency graph

Ports that need it on the left, what it needs to run on the right; at most 8 of each. "Dependencies" below lists them all.

Dependencies

As this port's Makefile names them.

Build 3

Runtime 3

Test 2

The full lists below include those, and their dependencies in turn.

Build dependencies 28
Run dependencies 28

No port depends on this one.

Configuration

No options to configure.

USES
perl5
Service scripts
none

Files

pkg-plist 2
  • %%SITE_PERL%%/Test/Mock/LWP/Dispatch.pm
  • %%PERL5_MAN3%%/Test::Mock::LWP::Dispatch.3.gz
distinfo 1
FileSizeSHA256
Test-Mock-LWP-Dispatch-0.08.tar.gz13634134bb2df2bf2e14c3e86d0d6887081140d9605f66054dc5b733e4e7c42f5b56c
Master sites 1
  • CPAN

Commit history 0

No commits in the history this site was built from.