File: 0001-Fix-a-warning-about-an-uninitialized-value.patch

package info (click to toggle)
libxml-commonns-perl 0.06-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 116 kB
  • sloc: perl: 67; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 769 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 180064b82e1725966273e3b62b7a8fcdc7eea55a Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Thu, 18 Sep 2014 00:00:29 +0300
Subject: [PATCH] Fix a warning about an uninitialized value

Bug: https://rt.cpan.org/Public/Bug/Display.html?id=98952
---
 lib/XML/CommonNS.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/XML/CommonNS.pm b/lib/XML/CommonNS.pm
index e1cca02..8e253d0 100644
--- a/lib/XML/CommonNS.pm
+++ b/lib/XML/CommonNS.pm
@@ -52,7 +52,7 @@ sub import {
 	my @opt = @_;
 
 	no strict 'refs';
-	@opt = keys %NS if $opt[0] eq ':all';
+	@opt = keys %NS if @opt and $opt[0] eq ':all';
 	for my $exp (@opt) {
 		die "No namespace available for key $exp" unless exists $NS{$exp};
 		__PACKAGE__->uri($exp);
-- 
2.1.0