From 2a15b2916a74273da604830d6080ebc289708015 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen.hemminger@vyatta.com>
Date: Fri, 4 Dec 2009 17:49:56 -0800
Subject: Fix perlcritic warnings in Keepalived

Keepalived.pm: Code before strictures are enabled at line 25, column 1.  See page 429 of PBP.  (Severity: 5)
Keepalived.pm: "return" statement with explicit "undef" at line 280, column 2.  See page 199 of PBP.  (Severity: 5)
---
 lib/Vyatta/Keepalived.pm | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

(limited to 'lib/Vyatta')

diff --git a/lib/Vyatta/Keepalived.pm b/lib/Vyatta/Keepalived.pm
index 26a0a38..437b055 100755
--- a/lib/Vyatta/Keepalived.pm
+++ b/lib/Vyatta/Keepalived.pm
@@ -22,6 +22,9 @@
 # **** End License ****
 #
 package Vyatta::Keepalived;
+use strict;
+use warnings;
+
 our @EXPORT = qw(get_conf_file get_state_script get_state_file 
                  vrrp_log vrrp_get_init_state get_changes_file
                  start_daemon restart_daemon stop_daemon
@@ -32,9 +35,6 @@ use Vyatta::Config;
 use Vyatta::Interface;
 use POSIX;
 
-use strict;
-use warnings;
-
 my $daemon           = '/usr/sbin/keepalived';
 my $keepalived_conf  = '/etc/keepalived/keepalived.conf';
 my $sbin_dir         = '/opt/vyatta/sbin';
@@ -276,9 +276,8 @@ sub vrrp_state_parse {
 	chomp $line;
 	my ($start_time, $intf, $group, $state, $ltime) = split(' ', $line);
 	return ($start_time, $intf, $group, $state, $ltime);
-    } else {
-	return undef;
-    }
+    } 
+    # else return undefined
 }
 
 sub vrrp_get_init_state {
-- 
cgit v1.2.3