Permalink
Browse files

Make sure to enable warnings, and bypass IO::Handle layer

  • Loading branch information...
1 parent 1532c28 commit a9b7a9681ae29df5806b61981145b668f469d6aa @miyagawa miyagawa committed Nov 27, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Plack/Middleware/Lint.pm
@@ -164,9 +164,10 @@ sub _has_wide_strings {
my $warnings = '';
{
+ use warnings;
local $SIG{__WARN__} = sub { $warnings .= $_[0] };
open my $io, ">", \(my $null);
- $io->print($str);
+ print {$io} $str;
}
$warnings =~ /Wide character in print/;

0 comments on commit a9b7a96

Please sign in to comment.