From 08eba82025b08e9d77a822c2fa3a7815bff3f6e7 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 15 Nov 2022 13:25:21 +0100 Subject: [PATCH] package template: introduce libdirs() method Signed-off-by: Wolfgang Bumiller --- Proxmox/Lib/template.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Proxmox/Lib/template.pm b/Proxmox/Lib/template.pm index d7cee5f..d7fbbf3 100644 --- a/Proxmox/Lib/template.pm +++ b/Proxmox/Lib/template.pm @@ -28,12 +28,15 @@ sub library { return '{{LIBRARY}}'; } +# Keep on a single line, modified by testsuite! +sub libdirs { return (map "-L$_/auto", @INC); } + sub load : prototype($) { my ($pkg) = @_; my $mod_name = $pkg->library(); - my @dirs = (map "-L$_/auto", @INC); + my @dirs = $pkg->libdirs(); my $mod_file = DynaLoader::dl_findfile({{DEBUG_LIBPATH}}@dirs, $mod_name); die "failed to locate shared library for $mod_name (lib${mod_name}.so)\n" if !$mod_file;