Win32 fix, kmx++
Tomas Doran [Sun, 6 Dec 2009 12:47:59 +0000 (12:47 +0000)]
Changes
t/lib/TestAppEncoding/Controller/Root.pm

diff --git a/Changes b/Changes
index 4fa4a01..9b47f27 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
 # This file documents the revision history for Perl extension Catalyst.
 
+  Bug fixes:
+   - Fix slurping a file to work correctly with binary on Win32 in the
+     encoding test controller.
+
   New features:
    - The __MOP__ hash element is suppressed from being dumped fully
      (and instead stringified) when dumping the error screen to be
index b5b3eeb..391a2cd 100644 (file)
@@ -8,7 +8,7 @@ __PACKAGE__->config->{namespace} = '';
 
 sub binary : Local {
     my ($self, $c) = @_;
-    $c->res->body(do { open(my $fh, '<', $c->path_to('..', '..', 'catalyst_130pix.gif')) or die $!; local $/ = undef; <$fh>; });
+    $c->res->body(do { open(my $fh, '<', $c->path_to('..', '..', 'catalyst_130pix.gif')) or die $!; binmode($fh); local $/ = undef; <$fh>; });
 }
 
 sub binary_utf8 : Local {