summaryrefslogtreecommitdiff
path: root/lib/Vyatta
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-12-04 17:49:56 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-12-04 17:49:56 -0800
commit2a15b2916a74273da604830d6080ebc289708015 (patch)
tree98b7667c12c3acfa5f885329624dfdca23cb51d5 /lib/Vyatta
parent6a6e2d279229017325de982af230ac6ff33eb740 (diff)
downloadvyatta-cfg-2a15b2916a74273da604830d6080ebc289708015.tar.gz
vyatta-cfg-2a15b2916a74273da604830d6080ebc289708015.zip
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)
Diffstat (limited to 'lib/Vyatta')
-rwxr-xr-xlib/Vyatta/Keepalived.pm11
1 files changed, 5 insertions, 6 deletions
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 {