diff -r 616b68fe423f -r 134e07aa6f64 libpurple/plugins/perl/perl.c --- a/libpurple/plugins/perl/perl.c Thu Jun 18 22:48:49 2009 +0000 +++ b/libpurple/plugins/perl/perl.c Thu Jun 18 23:01:51 2009 +0000 @@ -131,6 +131,7 @@ #endif { char *file = __FILE__; + GList *search_paths = purple_plugins_get_search_paths(); dXSUB_SYS; /* This one allows dynamic loading of perl modules in perl scripts by @@ -139,6 +140,17 @@ #ifdef _WIN32 newXS("Win32CORE::bootstrap", boot_Win32CORE, file); #endif + + while (search_paths != NULL) { + gchar *uselib; + const gchar *search_path = search_paths->data; + search_paths = g_list_next(search_paths); + + uselib = g_strdup_printf("unshift @INC, \"%s%cperl\";", + search_path, G_DIR_SEPARATOR); + eval_pv(uselib, TRUE); + g_free(uselib); + } } static void