From: minima Date: Tue, 10 Jan 2006 22:31:57 +0000 (+0000) Subject: add has_xml et al. X-Git-Tag: 1.53~90 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=817ce3f71cc80d27ceaca7706800ce1ac7e94b51;p=spider.git add has_xml et al. --- diff --git a/perl/DXXml.pm b/perl/DXXml.pm index 968b6148..e3c5f270 100644 --- a/perl/DXXml.pm +++ b/perl/DXXml.pm @@ -122,7 +122,23 @@ sub toxml $self->{id} ||= nextid(); my ($name) = ref $self =~ /::(\w+)$/; - my $s = $xs->XMLout($self, RootName =>$name, NumericEscape=>1); + my $s = $xs->XMLout($self, RootName =>lc $name, NumericEscape=>1); return $self->{'-xml'} = $s; } + +sub has_xml +{ + return exists $_[0]->{'-xml'}; +} + +sub has_pcxx +{ + return exists $_[0]->{'-pcxx'}; +} + +sub has_cmd +{ + return exists $_[0]->{'-cmd'}; +} + 1;