From 817ce3f71cc80d27ceaca7706800ce1ac7e94b51 Mon Sep 17 00:00:00 2001 From: minima Date: Tue, 10 Jan 2006 22:31:57 +0000 Subject: [PATCH] add has_xml et al. --- perl/DXXml.pm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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; -- 2.43.0