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

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Fri Dec 18 19:55:04 GMT 2009


Author: t0m
Date: 2009-12-18 19:55:03 +0000 (Fri, 18 Dec 2009)
New Revision: 12431

Added:
   Catalyst-Runtime/5.80/trunk/t/aggregate/error_page_dump.t
Modified:
   Catalyst-Runtime/5.80/trunk/Changes
   Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine.pm
Log:
Fix RT#52898, __MOP__ removal breaking debug screen with C::P::Session

Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes	2009-12-18 19:28:13 UTC (rev 12430)
+++ Catalyst-Runtime/5.80/trunk/Changes	2009-12-18 19:55:03 UTC (rev 12431)
@@ -3,6 +3,8 @@
   Bug fixes:
    - Remove the erroneous --detach option from Catalyst::Script::FastCGI
    - --daemon option to Catalyst::Script::FastCGI is fixed.
+   - Fix the debug dump for applications which use Catalyst::Plugin::Session
+     (RT#52898)
 
 5.80016 2009-12-11 23:23:33
 

Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine.pm	2009-12-18 19:28:13 UTC (rev 12430)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine.pm	2009-12-18 19:55:03 UTC (rev 12431)
@@ -115,7 +115,7 @@
     # This is fugly, but the metaclass is _HUGE_ and demands waaay too much
     # scrolling. Suggestions for more pleasant ways to do this welcome.
     local $val->{'__MOP__'} = "Stringified: "
-        . $val->{'__MOP__'} if exists $val->{'__MOP__'};
+        . $val->{'__MOP__'} if ref $val eq 'HASH' && exists $val->{'__MOP__'};
 
     my $text = encode_entities( dump( $val ));
     sprintf <<"EOF", $name, $text;

Added: Catalyst-Runtime/5.80/trunk/t/aggregate/error_page_dump.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/error_page_dump.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/error_page_dump.t	2009-12-18 19:55:03 UTC (rev 12431)
@@ -0,0 +1,15 @@
+use strict;
+use warnings;
+use Test::More;
+use Test::Exception;
+
+use Catalyst::Engine;
+
+my $m = sub { Catalyst::Engine->_dump_error_page_element(@_) };
+
+lives_ok { $m->('Scalar' => ['foo' => 'bar']) };
+lives_ok { $m->('Array' => ['foo' => []]) };
+lives_ok { $m->('Hash' => ['foo' => {}]) }; 
+
+done_testing;
+




More information about the Catalyst-commits mailing list