When creating instances without XML new() carp()s about the missing XML and returns a blessed Test::XPath reference. It should croak().
Can't call method "documentElement" without a package or object reference at /usr/lib/perl5/site_perl/5.8.8/Test/XPath.pm line 13.
_doc() is the one that does the carping:
'Test::XPath->new requires the "xml", "file", or "doc" parameter'
From the docs it looks as though instances are useless without the XML.
Die on invalid params to constructor.
Closed by 02ffa5d.