1use Test; 2BEGIN { plan tests => 4 } 3 4use XML::XPath; 5ok(1); 6 7eval 8{ 9 # Removing the 'my' makes this work?!? 10 my $xp = XML::XPath->new(xml => '<test/>'); 11 ok($xp); 12 13 $xp->findnodes('/test'); 14 15 ok(1); 16 17 die "This should be caught\n"; 18 19}; 20 21if ($@) 22{ 23 ok(1); 24} 25else { 26 ok(0); 27} 28