diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-01-24 16:59:31 +1100 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-01-26 16:59:38 -0800 |
commit | 1fd526a571ef2ecb638bfb3b620e5b13f07c4504 (patch) | |
tree | 2dda2701d35a295be3f83d9ca7ea284fa108e03a /lib | |
parent | 890f4f23a78faf9af51c4042e5ffa432750a20c3 (diff) | |
download | vyatta-cfg-1fd526a571ef2ecb638bfb3b620e5b13f07c4504.tar.gz vyatta-cfg-1fd526a571ef2ecb638bfb3b620e5b13f07c4504.zip |
Vyatta::Misc - Fix perl critic warnings
Eliminate warnings about 2 arg open, and non stricture.
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Vyatta/Misc.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Vyatta/Misc.pm b/lib/Vyatta/Misc.pm index 3c89871..83cc36e 100755 --- a/lib/Vyatta/Misc.pm +++ b/lib/Vyatta/Misc.pm @@ -22,15 +22,14 @@ # **** End License **** package Vyatta::Misc; +use strict; + require Exporter; -@ISA = qw(Exporter); -@EXPORT = qw(get_sysfs_value getInterfaces getNetAddIP isIpAddress is_ip_v4_or_v6 is_dhcp_enabled is_address_enabled); -@EXPORT_OK = qw(get_sysfs_value getNetAddIP isIpAddress is_ip_v4_or_v6 +our @ISA = qw(Exporter); +our @EXPORT = qw(get_sysfs_value getInterfaces getNetAddIP isIpAddress is_ip_v4_or_v6 is_dhcp_enabled is_address_enabled); +our @EXPORT_OK = qw(get_sysfs_value getNetAddIP isIpAddress is_ip_v4_or_v6 getInterfacesIPadresses getPortRuleString); - -use strict; - use Vyatta::Config; use Vyatta::Interface; use NetAddr::IP; @@ -103,7 +102,8 @@ sub getIP { my ($name, $type) = @_; my @addresses; - open my $ipcmd, "ip addr show dev $name |" + open my $ipcmd, '-|' + or exec qw(ip addr show dev), $name or die "ip addr command failed: $!"; <$ipcmd>; |