Author: mvidner Date: Fri Apr 22 14:04:55 2011 New Revision: 63850 URL: http://svn.opensuse.org/viewcvs/yast?rev=63850&view=rev Log: Replaced Perl 'switch' with 'if' to silence a warning (bnc#676679). # yast2 iscsi-server Switch will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /usr/share/YaST2/modules/IscsiServerFunctions.pm, line 11. Modified: trunk/iscsi-server/package/yast2-iscsi-server.changes trunk/iscsi-server/src/IscsiServerFunctions.pm Modified: trunk/iscsi-server/package/yast2-iscsi-server.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/iscsi-server/package/yast2-iscsi-server.changes?rev=63850&r1=63849&r2=63850&view=diff ============================================================================== --- trunk/iscsi-server/package/yast2-iscsi-server.changes (original) +++ trunk/iscsi-server/package/yast2-iscsi-server.changes Fri Apr 22 14:04:55 2011 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Fri Apr 22 14:03:44 CEST 2011 - mvidner@suse.cz + +- Replaced Perl 'switch' with 'if' to silence a warning (bnc#676679). + +------------------------------------------------------------------- Fri May 14 12:52:49 CEST 2010 - mzugec@suse.cz - improved UI for small screens (bnc#582306) Modified: trunk/iscsi-server/src/IscsiServerFunctions.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/iscsi-server/src/IscsiServerFunctions.pm?rev=63850&r1=63849&r2=63850&view=diff ============================================================================== --- trunk/iscsi-server/src/IscsiServerFunctions.pm (original) +++ trunk/iscsi-server/src/IscsiServerFunctions.pm Fri Apr 22 14:04:55 2011 @@ -8,7 +8,6 @@ use YaST::YCP qw(:LOGGING); use Data::Dumper; use YaPI; -use Switch; YaST::YCP::Import ("SCR"); @@ -428,18 +427,18 @@ my $target_name = ""; my @auths = (); my @luns = (); - foreach my $row (@{$targets{$target}}){ - switch ($row->{'KEY'}) { - case ('Target') { + foreach my $row (@{$targets{$target}}){ + my $key = $row->{'KEY'}; + + if ($key eq 'Target') { $target_name = $row->{'VALUE'}; } - case ('Lun') { + elsif ($key eq 'Lun') { push(@luns, $row->{'VALUE'}); } - case ('IncomingUser' || 'OutgoingUser') { - push(@auths, $row->{'KEY'} . ": " . $row->{'VALUE'}) + elsif ($key eq 'IncomingUser' || $key eq 'OutgoingUser') { + push(@auths, $key . ": " . $row->{'VALUE'}) } - } } $file = $file . $target_name . "\n"; $file = $file . "Luns: " . join(', ', @luns) . "\n" if (scalar(@luns) > 0); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org