diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2014-10-07 14:00:52 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2014-10-07 14:00:52 +0100 |
commit | b3e899dfaad77c48bf0f83c66a9a8a3c2233beb2 (patch) | |
tree | 99510b743787e3947a46e35ba9e9e8247339a858 /lib/Net/Cmd.pm | |
parent | 6b249e0122f764e186b14f7a7663a0ffd3055121 (diff) | |
download | perl-libnet-b3e899dfaad77c48bf0f83c66a9a8a3c2233beb2.tar.gz |
Fix a warning introduced by the previous commit
"Use of uninitialized value in join or string at lib/Net/Cmd.pm line 158."
Diffstat (limited to 'lib/Net/Cmd.pm')
-rw-r--r-- | lib/Net/Cmd.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Net/Cmd.pm b/lib/Net/Cmd.pm index 61e6956..b5abea2 100644 --- a/lib/Net/Cmd.pm +++ b/lib/Net/Cmd.pm @@ -195,7 +195,7 @@ sub set_status { my $cmd = shift; my ($code, $resp) = @_; - $resp = [$resp] + $resp = defined $resp ? [$resp] : [] unless ref($resp); (${*$cmd}{'net_cmd_code'}, ${*$cmd}{'net_cmd_resp'}) = ($code, $resp); |