From: minima Date: Tue, 10 Jan 2006 22:31:57 +0000 (+0000) Subject: add has_xml et al. X-Git-Tag: R_1_52~34 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=90eb20e9a8dbeb041cc2f77fbea05849bdc09245;hp=4a4022d665224a6ac7b7a539a4c1042aecbc07de;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;