Skip to content

Failed Object Instantiation Should Not Return A bless()'d Reference #3

sshaw opened this Issue Oct 21, 2010 · 1 comment

2 participants

sshaw commented Oct 21, 2010


When creating instances without XML new() carp()s about the missing XML and returns a blessed Test::XPath reference. It should croak().

For example:


dies with:

Can't call method "documentElement" without a package or object reference at /usr/lib/perl5/site_perl/5.8.8/Test/ line 13.

_doc() is the one that does the carping:

require Carp;
    'Test::XPath->new requires the "xml", "file", or "doc" parameter'

From the docs it looks as though instances are useless without the XML.

theory commented Oct 21, 2010

Die on invalid params to constructor.

Closed by 02ffa5d.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.