HTML-DOM

 view release on metacpan or  search on metacpan

t/html-dom.t

$doc->write('<p>Para ' . ($doc->body->childNodes->length+1))
</script>
</body>

-----

$doc->close;

{
	no warnings 'deprecated';
	local $[ = 1;
	use warnings 'deprecated';
	my @p_tags = $doc->body->childNodes;
	for(1..6){ 
		is $p_tags[$_]->tagName, 'P',
			"body\'s child node no. $_ is a P elem";
		isa_ok $p_tags[$_]->firstChild, 'HTML::DOM::Text',
			"first child of para $_";
		like $p_tags[$_]->firstChild->data, qr/Para $_\b/,
			"contents of para $_";
	}

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.470506 second using v1.00-cache-1.03-grep-7fa205e-cpan-6421e59f23b )