Commits

Shlomi Fish committed 1c7da09

Missing croak (RT #88624).

Comments (0)

Files changed (2)

 Revision history for Perl extension XML::LibXML
 
+    - Import croak from "use Carp;" to fix a missing croak definition.
+        - https://rt.cpan.org/Ticket/Display.html?id=88624
+
 2.0105          Sat  7 Sep 20:18:06 IDT 2013
     - Pull some commits from Jason Mash (JRMASH) to add convenience methods
       to the XML::LibXML::NodeList module.
 #-------------------------------------------------------------------------#
 package XML::LibXML::Node;
 
+use Carp qw(croak);
+
 use overload
     '""'   => sub { $_[0]->toString() },
     'bool' => sub { 1 },
 sub toStringEC14N {
     my ($self, $comments, $xpath, $xpc, $inc_prefix_list) = @_;
     unless (UNIVERSAL::isa($xpc,'XML::LibXML::XPathContext')) {
-      if ($inc_prefix_list) {
-	croak("toStringEC14N: 3rd argument is not an XML::LibXML::XPathContext");
-      } else {
-	$inc_prefix_list=$xpc;
-	$xpc=undef;
-      }
+        if ($inc_prefix_list) {
+            croak("toStringEC14N: 3rd argument is not an XML::LibXML::XPathContext");
+        } else {
+            $inc_prefix_list=$xpc;
+            $xpc=undef;
+        }
     }
     if (defined($inc_prefix_list) and !UNIVERSAL::isa($inc_prefix_list,'ARRAY')) {
-      croak("toStringEC14N: inclusive_prefix_list must be undefined or ARRAY");
+        croak("toStringEC14N: inclusive_prefix_list must be undefined or ARRAY");
     }
     return $self->_toStringC14N( $comments || 0,
-				 (defined $xpath ? $xpath : undef),
-				 1,
-				 (defined $inc_prefix_list ? $inc_prefix_list : undef),
-				 (defined $xpc ? $xpc : undef)
-				);
+        (defined $xpath ? $xpath : undef),
+        1,
+        (defined $inc_prefix_list ? $inc_prefix_list : undef),
+        (defined $xpc ? $xpc : undef)
+    );
 }
 
 *serialize_c14n = \&toStringC14N;