1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

added some tracability

This commit is contained in:
Daniel Stenberg 2002-01-08 09:32:10 +00:00
parent 6328428568
commit 9474e8d6d2

View File

@ -3,6 +3,9 @@
my @xml; my @xml;
my $warning=0;
my $trace=0;
sub getpartattr { sub getpartattr {
my ($section, $part)=@_; my ($section, $part)=@_;
@ -63,12 +66,21 @@ sub getpart {
$inside--; $inside--;
} }
elsif((1==$inside) && ($_ =~ /^ *\<\/$section/)) { elsif((1==$inside) && ($_ =~ /^ *\<\/$section/)) {
if($trace) {
print STDERR "*** getpart.pm: $section/$part returned data!\n";
}
if(!@this && $warning) {
print STDERR "*** getpart.pm: $section/$part returned empty!\n";
}
return @this; return @this;
} }
elsif(2==$inside) { elsif(2==$inside) {
push @this, $_; push @this, $_;
} }
} }
if($warning) {
print STDERR "*** getpart.pm: $section/$part returned empty!\n";
}
return @this; #empty! return @this; #empty!
} }