updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / uswsusp-git / no-deprecated-switch.patch
blob5ce5c558b5758b24781855a62cc79c2e24bf20b4
1 From fb9612ed33729460d209d4080cf5750271a02092 Mon Sep 17 00:00:00 2001
2 From: Dave Reisner <dreisner@archlinux.org>
3 Date: Fri, 8 Jul 2011 21:10:14 -0400
4 Subject: [PATCH] use given instead of deprecated switch
6 ---
7 wlcsv2c.pl | 10 +++++-----
8 1 files changed, 5 insertions(+), 5 deletions(-)
10 diff --git a/wlcsv2c.pl b/wlcsv2c.pl
11 index 8575371..704d6e9 100644
12 --- a/wlcsv2c.pl
13 +++ b/wlcsv2c.pl
14 @@ -2,21 +2,21 @@
15 # Rodolfo Garcia kix_at_kix.es
16 # suspend database management v1.0
18 -use Switch;
19 +use feature qw(switch);
21 -switch ($#ARGV) {
22 - case 0 {
23 +given ($#ARGV) {
24 + when (0) {
25 my $fin = $ARGV[0];
26 open(INF, "<$fin") or die "Could not open input file\n";
27 open(OUF, ">&STDOUT") or die "Could not open output file\n";
29 - case 1 {
30 + when (1) {
31 my $fin = $ARGV[0];
32 my $fout = $ARGV[1];
33 open(INF, "<$fin") or die "Could not open input file\n";
34 open(OUF, ">$fout") or die "Could not open output file\n";
36 - else {
37 + default {
38 my $msg = $0 . " <input-file> [output-file]";
39 die $msg;
41 --
42 1.7.6