Skip to content

Commit e860da2

Browse files
authored
Merge pull request #135 from oalders/namespace-autoclean-import
Fix warnings via namespace::autoclean
2 parents 5b88333 + 5027701 commit e860da2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server/src/perl/Inquisitor.pm

+5
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ $SIG{__WARN__} = sub { warn '=PerlWarning=', @_ };
1616
# These modules can cause issues because they wipe the symbol table before we get a chance to inspect it.
1717
# Prevent them from loading.
1818
# I hope this doesn't cause any issues, perhaps VERSION numbers or import statements would help here
19+
#
20+
# See https://perldoc.perl.org/perldelta#Calling-the-import-method-of-an-unknown-package-produces-a-warning
21+
# for a discussion of why the stub imports are necessary as of Perl 5.40
1922
$INC{'namespace/clean.pm'} = '';
2023
$INC{'namespace/autoclean.pm'} = '';
2124
{
2225
no strict 'refs';
2326
*{'namespace::autoclean::VERSION'} = sub { '0.29' };
2427
*{'namespace::clean::VERSION'} = sub { '0.27' };
28+
*{'namespace::autoclean::import'} = sub { };
29+
*{'namespace::clean::import'} = sub { };
2530
}
2631

2732
CHECK {

0 commit comments

Comments
 (0)