[Catalyst-commits] r8992 - in Catalyst-Runtime/5.80/trunk: . lib/Catalyst t

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Fri Jan 2 22:42:14 GMT 2009


Author: t0m
Date: 2009-01-02 22:42:14 +0000 (Fri, 02 Jan 2009)
New Revision: 8992

Modified:
   Catalyst-Runtime/5.80/trunk/Changes
   Catalyst-Runtime/5.80/trunk/lib/Catalyst/Test.pm
   Catalyst-Runtime/5.80/trunk/t/unit_load_catalyst_test.t
Log:
Catalyst::View::Mason fixed

Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes	2009-01-02 19:31:37 UTC (rev 8991)
+++ Catalyst-Runtime/5.80/trunk/Changes	2009-01-02 22:42:14 UTC (rev 8992)
@@ -1,5 +1,7 @@
 # This file documents the revision history for Perl extension Catalyst.
 
+        - Fix calling use Catalyst::Test 'MyApp' 'foo' which used to work,
+          but stopped as the 2nd parameter can be an options hash now (t0m)
         - Bump Moose dependency to fix make_immutable bug (t0m)
         - Use compile time extends in Catalyst::Controller (t0m)
         - Make Catalyst::Request::uploads attribute non-lazy, to fix

Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Test.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Test.pm	2009-01-02 19:31:37 UTC (rev 8991)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Test.pm	2009-01-02 22:42:14 UTC (rev 8992)
@@ -70,7 +70,7 @@
     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};
     }
 }

Modified: Catalyst-Runtime/5.80/trunk/t/unit_load_catalyst_test.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/unit_load_catalyst_test.t	2009-01-02 19:31:37 UTC (rev 8991)
+++ Catalyst-Runtime/5.80/trunk/t/unit_load_catalyst_test.t	2009-01-02 22:42:14 UTC (rev 8992)
@@ -4,9 +4,11 @@
 use warnings;
 
 use Test::More;
+use FindBin qw/$Bin/;
+use lib "$Bin/lib";
 use Catalyst::Utils;
 
-plan tests => 8;
+plan tests => 9;
 
 use_ok('Catalyst::Test');
 
@@ -50,3 +52,6 @@
     customize( $req, { host => '' } );
     is( $req->header('Host'), undef, 'default value can be temporarily cleared via opts hash' );
 }
+
+# Back compat test, extra args used to be ignored, now a hashref of options.
+use_ok('Catalyst::Test', 'TestApp', 'foobar');




More information about the Catalyst-commits mailing list