Skip to content

Commit

Permalink
count explicit Carps as compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Apr 6, 2011
1 parent 369ae7d commit c7bbb4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions t/00_compile.t
Expand Up @@ -37,9 +37,10 @@ foreach my $library (@modules) {
local $SIG{__WARN__} = sub {
my $warn = shift;
# file the warning occurred in
my $caller = caller;
my $warning_file = realpath( (caller(0))[1] );
# only care about it if it is within the WebGUI lib directory
if ($warning_file =~ /^\Q$wgLib/) {
# only care about it if it is within the WebGUI lib directory or is an explicit warning
if ($warning_file =~ /^\Q$wgLib/ || $caller eq 'Carp') {
$warnings .= $warn;
}
};
Expand Down

0 comments on commit c7bbb4e

Please sign in to comment.