From: Tomas Doran Date: Mon, 2 Jan 2012 11:34:42 +0000 (+0000) Subject: Use iomode => :raw to stop PNG files getting corrupted X-Git-Tag: 1.37~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b728fa3cdb9b5da96b3278b4c038407087889706;p=catagits%2FCatalyst-Devel.git Use iomode => :raw to stop PNG files getting corrupted --- diff --git a/Changes b/Changes index 3a9cb0d..68b2a65 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ This file documents the revision history for Perl extension Catalyst-Devel. + - Use iomode => ":raw" to stop PNG files getting corrupted + when being slurped on windows as noted on the mailing list. + 1.36 2011-10-24 17:58:00 - New apps send an X-Catalyst header by default (this can be disabled by changing the config in the generated app) diff --git a/lib/Catalyst/Helper.pm b/lib/Catalyst/Helper.pm index 7efa9ba..4d1b861 100644 --- a/lib/Catalyst/Helper.pm +++ b/lib/Catalyst/Helper.pm @@ -49,7 +49,7 @@ sub get_sharedir_file { } my $file = file( $dist_dir, @filename); Carp::confess("Cannot find $file") unless -r $file; - my $contents = $file->slurp; + my $contents = $file->slurp(iomode => "<:raw"); return $contents; }