From ad914d3a7e5ea9629bec8a899574c5ce9e12b1b1 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 13 Sep 2007 15:45:01 +0000 Subject: [PATCH] fix and cleanup utility skel --- sbin/_utility.skeleton | 53 +++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/sbin/_utility.skeleton b/sbin/_utility.skeleton index c6b7a9c25..7a8b08ff8 100644 --- a/sbin/_utility.skeleton +++ b/sbin/_utility.skeleton @@ -12,36 +12,35 @@ finish($session); #------------------------------------------------- sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - ); - my $session = WebGUI::Session->open("..",$configFile); - $session->user({userId=>3}); - - ## If your script is adding or changing content you need these lines, otherwise leave them commented - # - # my $versionTag = WebGUI::VersionTag->getWorking($session); - # $versionTag->set({name=>'Name Your Tag'}); - # - ## - - return $session; + my $configFile; + $| = 1; #disable output buffering + GetOptions( + 'configFile=s' => \$configFile, + ); + my $session = WebGUI::Session->open("..",$configFile); + $session->user({userId=>3}); + + ## If your script is adding or changing content you need these lines, otherwise leave them commented + # + # my $versionTag = WebGUI::VersionTag->getWorking($session); + # $versionTag->set({name => 'Name Your Tag'}); + # + ## + + return $session; } #------------------------------------------------- sub finish { - my $session = shift; - my $versionTag = WebGUI::VersionTag->getWorking($session); - - ## If your script is adding or changing content you need these lines, otherwise leave them commented - # - # my $versionTag = WebGUI::VersionTag->getWorking($session); - # $versionTag->commit; - ## - - $session->var->end; - $session->close(); + my $session = shift; + + ## If your script is adding or changing content you need these lines, otherwise leave them commented + # + # my $versionTag = WebGUI::VersionTag->getWorking($session); + # $versionTag->commit; + ## + + $session->var->end; + $session->close; }