[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm
raeburn
raeburn@source.lon-capa.org
Fri, 27 May 2011 19:07:25 -0000
raeburn Fri May 27 19:07:25 2011 EDT
Modified files:
/loncom/xml lonxml.pm
Log:
- Avoid "Use of uninitialized value in concatenation (.) or string" warnings.
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.518 loncom/xml/lonxml.pm:1.519
--- loncom/xml/lonxml.pm:1.518 Wed Sep 29 16:09:20 2010
+++ loncom/xml/lonxml.pm Fri May 27 19:07:25 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.518 2010/09/29 16:09:20 raeburn Exp $
+# $Id: lonxml.pm,v 1.519 2011/05/27 19:07:25 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2039,8 +2039,8 @@
my $key;
if ($token->[1] eq 'tag') {
$tag = $token->[2]{'name'};
- $insertlist{"$tagnum.tag"} = $tag;
- $insertlist{"$tag.num"} = $tagnum;
+ $insertlist{$tagnum.'.tag'} = $tag;
+ $insertlist{$tag.'.num'} = $tagnum;
push(@alltags,$tag);
} elsif ($in_help && $token->[1] eq 'file') {
$key = $tag.'.helpfile';
@@ -2073,12 +2073,12 @@
# parse the allows and ignore tags set to <show>no</show>
foreach my $tag (@alltags) {
- next if (!exists($insertlist{"$tag.allow"}));
- my $allow = $insertlist{"$tag.allow"};
+ next if (!exists($insertlist{$tag.'.allow'}));
+ my $allow = $insertlist{$tag.'.allow'};
foreach my $element (split(',',$allow)) {
$element =~ s/(^\s*|\s*$ )//gx;
- if (!exists($insertlist{"$element.show"})
- || $insertlist{"$element.show"} ne 'no') {
+ if (!exists($insertlist{$element.'.show'})
+ || $insertlist{$element.'.show'} ne 'no') {
push(@{ $insertlist{$tag.'.which'} },$element);
}
}