From f289e779555f8102e3bb13b405f5ed1b816034b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Hern=C3=A1ndez-Novich?= Date: Mon, 9 Jun 2008 15:24:49 +0000 Subject: [PATCH] Added $webguiRoot and BEGIN preamble to utility skeleton. --- sbin/_utility.skeleton | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sbin/_utility.skeleton b/sbin/_utility.skeleton index f39141b65..a697236ed 100644 --- a/sbin/_utility.skeleton +++ b/sbin/_utility.skeleton @@ -8,7 +8,13 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use lib "../lib"; +our ($webguiRoot); + +BEGIN { + $webguiRoot = ".."; + unshift (@INC, $webguiRoot."/lib"); +} + use strict; use Pod::Usage; use Getopt::Long; @@ -33,7 +39,7 @@ sub start { GetOptions( 'configFile=s' => \$configFile, ); - my $session = WebGUI::Session->open("..",$configFile); + my $session = WebGUI::Session->open($webguiRoot,$configFile); $session->user({userId=>3}); ## If your script is adding or changing content you need these lines, otherwise leave them commented