tokuhirom/Web-Query — pull request #4 by olegwtf (2012-05-23 07:29:26+00:00)
Title: first() and last() shouldn't modify self

As jQuery docs says ```.first() method constructs a new jQuery object from the first matching element```. In the current W::Q version first() and last() modifies $self and returns it. In the example below jQuery outputs "a" and "b", but W::Q outputs "a" and "a"

use Web::Query;
use strict;

my $xx = wq(q!

a

b

!)->find('.xx');

warn $xx->first->text;
warn $xx->last->text;