[csw-devel] SF.net SVN: gar:[11998] csw/mgar/pkg/cswpkgloghooks/trunk/files

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Sat Dec 18 15:00:44 CET 2010


Revision: 11998
          http://gar.svn.sourceforge.net/gar/?rev=11998&view=rev
Author:   bdwalton
Date:     2010-12-18 14:00:44 +0000 (Sat, 18 Dec 2010)

Log Message:
-----------
cswpkgloghooks: a few perl cleanups in the hook scripts

Modified Paths:
--------------
    csw/mgar/pkg/cswpkgloghooks/trunk/files/01-CSWcswpkgloghooks-postupgrade
    csw/mgar/pkg/cswpkgloghooks/trunk/files/01-CSWcswpkgloghooks-preupgrade

Modified: csw/mgar/pkg/cswpkgloghooks/trunk/files/01-CSWcswpkgloghooks-postupgrade
===================================================================
--- csw/mgar/pkg/cswpkgloghooks/trunk/files/01-CSWcswpkgloghooks-postupgrade	2010-12-18 13:50:20 UTC (rev 11997)
+++ csw/mgar/pkg/cswpkgloghooks/trunk/files/01-CSWcswpkgloghooks-postupgrade	2010-12-18 14:00:44 UTC (rev 11998)
@@ -17,15 +17,15 @@
 print STATEFILE "$sysver";
 close(STATEFILE)
 
-sub logdie() {
-    my $arg = shift;
+sub logdie {
+    local $arg = shift;
     system('logger', '-t', 'cswpkgloghooks', $arg);
     exit 0
 }
 
-sub success() {
-    my $old = shift;
-    my $msg = '';
+sub success {
+    local $old = shift;
+    local $msg = '';
     if ($script =~ /install$/) {
 	$msg = "installed $pkg $ver";
     } elsif ($script =~ /upgrade$/) {
@@ -37,9 +37,9 @@
     logdie $msg;
 }
 
-function failure() {
-    my $old = shift;
-    my $msg = '';
+sub failure {
+    local $old = shift;
+    local $msg = '';
     if ($script =~ /install$/) {
 	$msg = "Failed to install $pkg $ver";
     } elsif ($script =~ /upgrade$/) {

Modified: csw/mgar/pkg/cswpkgloghooks/trunk/files/01-CSWcswpkgloghooks-preupgrade
===================================================================
--- csw/mgar/pkg/cswpkgloghooks/trunk/files/01-CSWcswpkgloghooks-preupgrade	2010-12-18 13:50:20 UTC (rev 11997)
+++ csw/mgar/pkg/cswpkgloghooks/trunk/files/01-CSWcswpkgloghooks-preupgrade	2010-12-18 14:00:44 UTC (rev 11998)
@@ -14,4 +14,4 @@
 
 open(STATEFILE, ">$statefile") or die "Couldn't open $statefile.";
 print STATEFILE "$sysver";
-close(STATEFILE)
+close(STATEFILE);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list