diff options
author | Timo Sirainen <cras@irssi.org> | 2001-10-24 13:20:26 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-10-24 13:20:26 +0000 |
commit | 1c9a8ab897e07249177bfd22ae4438c2deaed106 (patch) | |
tree | 3f5e1b0429ef4556777e7c1bf0c3c54f6628bfb1 /src/perl | |
parent | b2fdbd64c6f8aa55832295ed152b7f3c56cdb15f (diff) | |
download | irssi-1c9a8ab897e07249177bfd22ae4438c2deaed106.zip |
/SET perl_use_lib setting to specify the path for irssi's perl libraries.
Default should work usually, but if you for some reason want to use different
then change this. May contain multiple paths separated with space.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1905 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl')
-rw-r--r-- | src/perl/perl-common.c | 6 | ||||
-rw-r--r-- | src/perl/perl-core.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c index 276ae14e..b382e4c4 100644 --- a/src/perl/perl-common.c +++ b/src/perl/perl-common.c @@ -172,11 +172,13 @@ char *perl_get_use_list(void) GString *str; GSList *tmp; char *ret; + const char *use_lib; str = g_string_new(NULL); - if (*PERL_USE_LIB != '\0') - g_string_append(str, "use lib \""PERL_USE_LIB"\";"); + use_lib = settings_get_str("perl_use_lib"); + if (*use_lib != '\0') + g_string_sprintf(str, "use lib qw(%s);", use_lib); g_string_append(str, "use Irssi;"); if (irssi_gui != IRSSI_GUI_NONE) diff --git a/src/perl/perl-core.c b/src/perl/perl-core.c index eaaba100..87d5be19 100644 --- a/src/perl/perl-core.c +++ b/src/perl/perl-core.c @@ -24,6 +24,7 @@ #include "core.h" #include "signals.h" #include "misc.h" +#include "settings.h" #include "perl-core.h" #include "perl-common.h" @@ -397,6 +398,7 @@ static void sig_autorun() void perl_core_init(void) { print_script_errors = 1; + settings_add_str("per", "perl_use_lib", PERL_USE_LIB); PL_perl_destruct_level = 1; perl_signals_init(); |