X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Foptional_threads.t;fp=t%2Foptional_threads.t;h=3d7dd8abf47e1809d6a8033e04704bbf875eb263;hp=b0a05c9becf7cefaeebc06aedde7257ba8c7a4e4;hb=4e45fa288ea80bf2a4587dd2278c784286aafdc3;hpb=e91462552b2ba10034c82a4c981fe63dfeb57a6e diff --git a/t/optional_threads.t b/t/optional_threads.t index b0a05c9..3d7dd8a 100644 --- a/t/optional_threads.t +++ b/t/optional_threads.t @@ -28,13 +28,14 @@ else { } no warnings 'redefine'; -sub request { +my $request_code = \&request; +*request = sub { my $thr = threads->new( - sub { Catalyst::Test::local_request('TestApp',@_) }, + sub { $request_code->(@_) }, @_ ); $thr->join; -} +}; # test that running inside a thread works ok {