3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-02 01:18:40 +02:00

Plugins/Plang.pm: update path to Plang/lib

This commit is contained in:
Pragmatic Software 2020-09-27 14:00:45 -07:00
parent cdb11ccf4c
commit a0f3d28b80

View File

@ -21,13 +21,12 @@ sub initialize {
# load Plang modules # load Plang modules
my $path = $self->{pbot}->{registry}->get_value('general', 'plang_dir') // 'Plang'; 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 # require all the Plang .pm modules for Module::Refresh
# needing to restart PBot
require "$path/Interpreter.pm"; require "$path/Interpreter.pm";
require "$path/AstInterpreter.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/Parser.pm";
require "$path/Lexer.pm"; require "$path/Lexer.pm";
require "$path/Types.pm"; require "$path/Types.pm";