summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Getopt/Long.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Getopt/Long.pm b/lib/Getopt/Long.pm
index 25bf704d34..5dd5d16b25 100644
--- a/lib/Getopt/Long.pm
+++ b/lib/Getopt/Long.pm
@@ -599,7 +599,7 @@ sub GetOptions {
# Make sure a valid perl identifier results.
my $ov = $o;
$ov =~ s/\W/_/g;
- if ( $c =~ /@/ ) {
+ if ( $c && $c =~ /@/ ) {
print STDERR ("=> link \"$o\" to \@$pkg","::opt_$ov\n")
if $debug;
eval ("\$linkage{\$o} = \\\@".$pkg."::opt_$ov;");