From a0f3d28b8050de4ed5f3e56f9148eec86fd3fd64 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 27 Sep 2020 14:00:45 -0700 Subject: [PATCH] Plugins/Plang.pm: update path to Plang/lib --- Plugins/Plang.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Plugins/Plang.pm b/Plugins/Plang.pm index 0cf4d357..3b7e4ce3 100644 --- a/Plugins/Plang.pm +++ b/Plugins/Plang.pm @@ -21,13 +21,12 @@ sub initialize { # load Plang modules my $path = $self->{pbot}->{registry}->get_value('general', 'plang_dir') // 'Plang'; - unshift @INC, $path if not grep { $_ eq $path } @INC; + unshift @INC, "$path/lib" if not grep { $_ eq "$path/lib" } @INC; - # require all the Plang .pm modules so Module::Refresh can reload them without - # needing to restart PBot + # require all the Plang .pm modules for Module::Refresh require "$path/Interpreter.pm"; require "$path/AstInterpreter.pm"; - require "$path/Grammar.pm"; # FIXME: this module cannot be reloaded + require "$path/Grammar.pm"; # FIXME: Module::Refresh doesn't like this one require "$path/Parser.pm"; require "$path/Lexer.pm"; require "$path/Types.pm";