Skip to content

Commit

Permalink
speed up collecting of nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 2, 2014
1 parent 1d5d6b9 commit 438ec4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/DOM.pm
Expand Up @@ -239,8 +239,8 @@ sub _ancestors {
sub _collect {
my $self = shift;
my $xml = $self->xml;
return Mojo::Collection->new(@_)
->map(sub { $_->[0] eq 'tag' ? _tag($self, $_, $xml) : _node($self, $_) });
return Mojo::Collection->new(
map { $_->[0] eq 'tag' ? _tag($self, $_, $xml) : _node($self, $_) } @_);
}

sub _content {
Expand Down

0 comments on commit 438ec4a

Please sign in to comment.