1my $t; use lib ($t = -e 't' ? 't' : 'test'), 'inc'; 2 3use TestpQuery tests => 2; 4 5use pQuery; 6 7$pQuery::document = "$t/document2.html"; 8# $pQuery::document = 'index.html'; 9 10my $pquery; 11 12# $pquery = pQuery('table:eq(1) tr'); 13$pquery = pQuery->find("table:eq(1) tr"); 14 15is $pquery->length, 89, ':eq works'; 16 17$pQuery::document = "$t/document3.html"; 18 19$pquery = pQuery("$t/document3.html")->find('table:eq(1) tr'); 20 21is $pquery->length, 2, '* works'; 22