use t::TestpQuery tests => 3; use pQuery; is ref(pQuery->end), 'pQuery', 'end works when no stack exists'; my $pq = pQuery('Foo Bar Baz'); is $pq->find('b')->each(sub { pass "One time" })->end->length, 3, 'end works';