Skip to content

Commit

Permalink
stop recursion warnings in Mojo::DOM and Mojo::DOM::HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
jberger committed Jul 13, 2014
1 parent c27c103 commit 28458bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Mojo/DOM.pm
Expand Up @@ -311,6 +311,8 @@ sub _tag { shift->new->tree(shift)->xml(shift) }
sub _text {
my ($nodes, $recurse, $trim) = @_;

no warnings 'recursion';

# Merge successive text nodes
my $i = 0;
while (my $next = $nodes->[$i + 1]) {
Expand Down
2 changes: 2 additions & 0 deletions lib/Mojo/DOM/HTML.pm
Expand Up @@ -213,6 +213,8 @@ sub _node {
sub _render {
my ($tree, $xml) = @_;

no warnings 'recursion';

# Text (escaped)
my $type = $tree->[0];
return xml_escape $tree->[1] if $type eq 'text';
Expand Down

0 comments on commit 28458bb

Please sign in to comment.