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

