Don't ignore SIGCHLD while handling requests with the dev server.
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Test.pm
index 9791b24..65c4354 100644 (file)
@@ -70,7 +70,7 @@ our $default_host;
     sub import {
         my ($self, $class, $opts) = @_;
         $import->($self, '-all' => { class => $class });
-        $opts ||= {};
+        $opts = {} unless ref $opts eq 'HASH';
         $default_host = $opts->{default_host} if exists $opts->{default_host};
     }
 }
@@ -255,6 +255,7 @@ sub remote_request {
 sub _customize_request {
     my $request = shift;
     my $opts = pop(@_) || {};
+    $opts = {} unless ref($opts) eq 'HASH';
     if ( my $host = exists $opts->{host} ? $opts->{host} : $default_host  ) {
         $request->header( 'Host' => $host );
     }