X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-HTTP-AnyUA;a=blobdiff_plain;f=t%2Flib%2FMockBackend.pm;h=36f13e08c3d9268557e55728fc5cfc044b46c7e4;hp=c8b653544eff5292e329e39c85788aeaa1b47aca;hb=9912305ac09411c49413fbf1364cfe209ac04adc;hpb=e84eddb615dd7c11aad9c3ac58100455c6227cad diff --git a/t/lib/MockBackend.pm b/t/lib/MockBackend.pm index c8b6535..36f13e0 100644 --- a/t/lib/MockBackend.pm +++ b/t/lib/MockBackend.pm @@ -4,6 +4,9 @@ package MockBackend; use warnings; use strict; +use Scalar::Util qw(blessed); +use namespace::clean; + use parent 'HTTP::AnyUA::Backend'; @@ -28,6 +31,8 @@ Get the requests the backend has handled so far. sub requests { @{$_[0]->{requests} || []} } +sub response_is_future { blessed($_[0]->{response}) && $_[0]->{response}->isa('Future') } + sub request { my $self = shift;