From 023f1b88b18b3d888976114db40e7718cf6cbc20 Mon Sep 17 00:00:00 2001 From: iliajie Date: Wed, 16 Nov 2022 23:29:22 +0200 Subject: [PATCH] Fix to place `package` always at the top --- WebminCore.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/WebminCore.pm b/WebminCore.pm index f00abda3b..c3a595485 100644 --- a/WebminCore.pm +++ b/WebminCore.pm @@ -12,13 +12,14 @@ Full function documentation is in web-lib-funcs.pl. =cut -use lib ("$ENV{'PERLLIB'}/vendor_perl"); - -$main::export_to_caller = 1; package WebminCore; +use lib ("$ENV{'PERLLIB'}/vendor_perl"); require Exporter; @ISA = qw(Exporter); +# Export global variables to caller +$main::export_to_caller = 1; + # Add functions in web-lib-funcs.pl # Generated with : # grep -h "^sub " web-lib-funcs.pl ui-lib.pl | sed -e 's/sub //' | xargs echo