count explicit Carps as compile warnings
This commit is contained in:
parent
369ae7d4d4
commit
c7bbb4e639
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue