1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -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 $warning=0;
my $trace=0;
sub getpartattr {
my ($section, $part)=@_;
@ -63,12 +66,21 @@ sub getpart {
$inside--;
}
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;
}
elsif(2==$inside) {
push @this, $_;
}
}
if($warning) {
print STDERR "*** getpart.pm: $section/$part returned empty!\n";
}
return @this; #empty!
}