diff options
author | bscan <10503608+bscan@users.noreply.github.com> | 2023-10-22 15:16:23 -0400 |
---|---|---|
committer | bscan <10503608+bscan@users.noreply.github.com> | 2023-10-22 15:16:23 -0400 |
commit | 9b87dada5a084fb6b1f010e1ddb165874bbb26b8 (patch) | |
tree | b850e9b73a56c4a190abca47f6f24f5cf3cb0c57 | |
parent | e151557e427f905a5b19c93eea7ff545d2bdec77 (diff) | |
download | PerlNavigator-9b87dada5a084fb6b1f010e1ddb165874bbb26b8.zip |
Fix for namespace clean and autoclean
-rw-r--r-- | server/src/perl/Inquisitor.pm | 6 | ||||
-rw-r--r-- | testWorkspace/MyLib/MyClass.pm | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/server/src/perl/Inquisitor.pm b/server/src/perl/Inquisitor.pm index 7f2b920..26521b5 100644 --- a/server/src/perl/Inquisitor.pm +++ b/server/src/perl/Inquisitor.pm @@ -13,6 +13,12 @@ my @checkPreloaded = qw(List::Util File::Spec Sub::Util Cwd Scalar::Util Class:: # Mark warnings to detect difference between warnings and errors. Inspired by https://github.com/skaji/syntax-check-perl $SIG{__WARN__} = sub { warn '=PerlWarning=', @_ }; +# These modules can cause issues because they wipe the symbol table before we get a chance to inspect it. +# Prevent them from loading. +# I hope this doesn't cause any issues, perhaps VERSION numbers or import statements would help here +$INC{'namespace/clean.pm'} = ''; +$INC{'namespace/autoclean.pm'} = ''; + CHECK { if(!$ENV{'PERLNAVIGATORTEST'}){ run(); diff --git a/testWorkspace/MyLib/MyClass.pm b/testWorkspace/MyLib/MyClass.pm index aaf6872..40b1824 100644 --- a/testWorkspace/MyLib/MyClass.pm +++ b/testWorkspace/MyLib/MyClass.pm @@ -3,6 +3,9 @@ use strict; use warnings; use Data::Dumper qw(Dumper); use experimental 'signatures'; +use namespace::autoclean; +use namespace::clean; + sub new { my $class = shift; |