You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ja...@apache.org on 2002/03/25 07:44:48 UTC
cvs commit: xml-xerces/perl Xerces.pm
jasons 02/03/24 22:44:48
Modified: perl Xerces.pm
Log:
new
Revision Changes Path
1.10 +40 -8 xml-xerces/perl/Xerces.pm
Index: Xerces.pm
===================================================================
RCS file: /home/cvs/xml-xerces/perl/Xerces.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Xerces.pm 25 Mar 2002 06:00:11 -0000 1.9
+++ Xerces.pm 25 Mar 2002 06:44:48 -0000 1.10
@@ -1519,9 +1519,13 @@
sub getChildNodes {
my @args = @_;
my $result = XML::Xercesc::DOM_Node_getChildNodes(@args);
- return undef if (!defined($result));
+ unless (defined $result) {
+ return () if wantarray;
+ return undef; # if *not* wantarray
+ }
return $result->to_list() if wantarray;
$DOM_NodeList::OWNER{$result} = 1;
+
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
@@ -1561,9 +1565,13 @@
sub getAttributes {
my @args = @_;
my $result = XML::Xercesc::DOM_Node_getAttributes(@args);
- return undef if (!defined($result));
+ unless (defined $result) {
+ return () if wantarray;
+ return undef; # if *not* wantarray
+ }
return $result->to_hash() if wantarray;
$DOM_NamedNodeMap::OWNER{$result} = 1;
+
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
@@ -1912,9 +1920,13 @@
sub getElementsByTagName {
my @args = @_;
my $result = XML::Xercesc::DOM_Document_getElementsByTagName(@args);
- return undef if (!defined($result));
+ unless (defined $result) {
+ return () if wantarray;
+ return undef; # if *not* wantarray
+ }
return $result->to_list() if wantarray;
$DOM_NodeList::OWNER{$result} = 1;
+
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
@@ -1946,9 +1958,13 @@
sub getElementsByTagNameNS {
my @args = @_;
my $result = XML::Xercesc::DOM_Document_getElementsByTagNameNS(@args);
- return undef if (!defined($result));
+ unless (defined $result) {
+ return () if wantarray;
+ return undef; # if *not* wantarray
+ }
return $result->to_list() if wantarray;
$DOM_NodeList::OWNER{$result} = 1;
+
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
@@ -2005,9 +2021,13 @@
sub getEntities {
my @args = @_;
my $result = XML::Xercesc::DOM_DocumentType_getEntities(@args);
- return undef if (!defined($result));
+ unless (defined $result) {
+ return () if wantarray;
+ return undef; # if *not* wantarray
+ }
return $result->to_hash() if wantarray;
$DOM_NamedNodeMap::OWNER{$result} = 1;
+
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
@@ -2015,9 +2035,13 @@
sub getNotations {
my @args = @_;
my $result = XML::Xercesc::DOM_DocumentType_getNotations(@args);
- return undef if (!defined($result));
+ unless (defined $result) {
+ return () if wantarray;
+ return undef; # if *not* wantarray
+ }
return $result->to_hash() if wantarray;
$DOM_NamedNodeMap::OWNER{$result} = 1;
+
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
@@ -2173,9 +2197,13 @@
sub getElementsByTagName {
my @args = @_;
my $result = XML::Xercesc::DOM_Element_getElementsByTagName(@args);
- return undef if (!defined($result));
+ unless (defined $result) {
+ return () if wantarray;
+ return undef; # if *not* wantarray
+ }
return $result->to_list() if wantarray;
$DOM_NodeList::OWNER{$result} = 1;
+
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
@@ -2229,9 +2257,13 @@
sub getElementsByTagNameNS {
my @args = @_;
my $result = XML::Xercesc::DOM_Element_getElementsByTagNameNS(@args);
- return undef if (!defined($result));
+ unless (defined $result) {
+ return () if wantarray;
+ return undef; # if *not* wantarray
+ }
return $result->to_list() if wantarray;
$DOM_NodeList::OWNER{$result} = 1;
+
my %resulthash;
tie %resulthash, ref($result), $result;
return bless \%resulthash, ref($result);
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org