diff options
-rw-r--r-- | MDK/Common/Func.pm | 2 | ||||
-rw-r--r-- | MDK/Common/Various.pm | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/MDK/Common/Func.pm b/MDK/Common/Func.pm index c77b588..8048da9 100644 --- a/MDK/Common/Func.pm +++ b/MDK/Common/Func.pm @@ -201,7 +201,7 @@ sub map_index(&@) { } sub each_index(&@) { my $f = shift; - my @v; local $::i = 0; + local $::i = 0; foreach (@_) { &$f($::i); $::i++; diff --git a/MDK/Common/Various.pm b/MDK/Common/Various.pm index 8a12c14..88db031 100644 --- a/MDK/Common/Various.pm +++ b/MDK/Common/Various.pm @@ -118,7 +118,7 @@ sub chomp_ { my @l = map { my $l = $_; chomp $l; $l } @_; wantarray() ? @l : $l[ sub backtrace { my $s; for (my $i = 1; caller($i); $i++) { - my ($package, $file, $line, $func) = caller($i); + my ($_package, $file, $line, $func) = caller($i); $s .= "$func() called from $file:$line\n"; } $s; @@ -130,7 +130,7 @@ sub internal_error { sub noreturn { if (defined wantarray()) { - my ($package, $file, $line, $func) = caller(1); + my ($_package, $file, $line, $func) = caller(1); my (undef, undef, undef, $func2) = caller(2); die "$file:$line: $func2() expects a value from $func(), but $func() doesn't return any value\n"; } |