[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 06 Mar 2003 21:08:21 -0000
albertel Thu Mar 6 16:08:21 2003 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- I thin <part> inside of <import> works now, it does reorder the info so that the part info comes before the import info
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.332 loncom/lonnet/perl/lonnet.pm:1.333
--- loncom/lonnet/perl/lonnet.pm:1.332 Sat Mar 1 10:13:58 2003
+++ loncom/lonnet/perl/lonnet.pm Thu Mar 6 16:08:21 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.332 2003/03/01 15:13:58 www Exp $
+# $Id: lonnet.pm,v 1.333 2003/03/06 21:08:21 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3081,12 +3081,19 @@
#
my $package=$token->[2]->{'package'};
my $keyroot='';
- if ($prefix) {
- $keyroot.=$prefix;
- } else {
- if (defined($token->[2]->{'part'})) {
- $keyroot.='_'.$token->[2]->{'part'};
- }
+ if (defined($prefix) && $prefix !~ /^__/) {
+ # prefix that has a part already
+ $keyroot=$prefix;
+ } elsif (defined($prefix)) {
+ # prefix that is missing a part
+ if (defined($token->[2]->{'part'})) {
+ $keyroot='_'.$token->[2]->{'part'}.substr($prefix,1);
+ }
+ } else {
+ # no prefix at all
+ if (defined($token->[2]->{'part'})) {
+ $keyroot='_'.$token->[2]->{'part'};
+ }
}
if (defined($token->[2]->{'id'})) {
$keyroot.='_'.$token->[2]->{'id'};