Permalink
Browse files

Merge branch 'cop_fix' of https://github.com/wchristian/Devel--Cover

…into dzil
  • Loading branch information...
2 parents 5aa948d + 82710ac commit a56450bee4263bc09aeca7251cbcabe9ef7b0ca3 @pjcj committed Oct 13, 2011
Showing with 16 additions and 2 deletions.
  1. +1 −1 lib/Devel/Cover.pm
  2. +1 −1 lib/Devel/Cover/DB/Structure.pm
  3. +2 −0 tests/COP.pm
  4. +12 −0 tests/cop.t
View
2 lib/Devel/Cover.pm
@@ -552,7 +552,7 @@ sub use_file
# system "pwd; ls -l '$file'";
$Files{$file} = -e $file ? 1 : 0;
- warn __PACKAGE__ . qq(: Can't find file "$file" (@_): ignored.\n)
+ print STDERR __PACKAGE__ . qq(: Can't find file "$file" (@_): ignored.\n)
unless $Files{$file} || $Silent || $file =~ $Moose_filenames;
$Files{$file}
View
2 lib/Devel/Cover/DB/Structure.pm
@@ -230,7 +230,7 @@ sub digest
}
else
{
- warn "Devel::Cover: Can't open $file for MD5 digest: $!\n"
+ print STDERR "Devel::Cover: Can't open $file for MD5 digest: $!\n"
unless lc $file eq "-e" or
$file =~ $Devel::Cover::Moose_filenames;
# require "Cwd"; warn Carp::longmess("in " . Cwd::cwd());
View
2 tests/COP.pm
@@ -0,0 +1,2 @@
+#line 64 "Parser.yp"
+1;
View
12 tests/cop.t
@@ -0,0 +1,12 @@
+use strict;
+use warnings;
+
+use Test::More;
+use Devel::Cover;
+
+use lib 'tests';
+
+$SIG{__WARN__} = sub { die @_ };
+require COP;
+ok 1, "warnings in a file with file location comments don't cause a die";
+done_testing;

0 comments on commit a56450b

Please sign in to comment.