From 1c9a8ab897e07249177bfd22ae4438c2deaed106 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 24 Oct 2001 13:20:26 +0000 Subject: [PATCH] /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 --- src/perl/perl-common.c | 6 ++++-- 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();