From: Sebastian Riedel Date: Sun, 23 Oct 2005 14:04:49 +0000 (+0000) Subject: Fixed Catalyst::Test to not throw a exception when the appclass can't be required X-Git-Tag: 5.7099_04~1119 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=68eb5874bcda8eed45d92481248a77533944671a;hp=9ce5ab638a3850ea9b2449dc1ed20693f5478973 Fixed Catalyst::Test to not throw a exception when the appclass can't be required --- diff --git a/lib/Catalyst/Test.pm b/lib/Catalyst/Test.pm index 8157bf3..023b8e5 100644 --- a/lib/Catalyst/Test.pm +++ b/lib/Catalyst/Test.pm @@ -79,16 +79,6 @@ sub import { else { $class->require; - - if ( $@ ) { - - my $error = $UNIVERSAL::require::ERROR; - - Catalyst::Exception->throw( - message => qq/Couldn't load "$class", "$error"/ - ); - } - $class->import; $request = sub { $class->run(@_) }; @@ -111,11 +101,11 @@ Do an actual remote request using LWP. sub remote_request { - require LWP::UserAgent; - + require LWP::UserAgent; + my $request = Catalyst::Utils::request( shift(@_) ); - my $server = URI->new( $ENV{CATALYST_SERVER} ); + my $server = URI->new( $ENV{CATALYST_SERVER} ); if ( $server->path =~ m|^(.+)?/$| ) { $server->path("$1"); # need to be quoted @@ -126,7 +116,7 @@ sub remote_request { $request->uri->port( $server->port ); $request->uri->path( $server->path . $request->uri->path ); - unless ( $agent ) { + unless ($agent) { $agent = LWP::UserAgent->new( keep_alive => 1,