I am getting Child exited without calling finalize() Errors in my testing. But I haven't read about that anywhere so far.

I am testing imports on string require. The first subtest works, the subs are defined in the calling main, and warn about redefinition. And they are not defined in the calling package.

As the namespace is not imported (there is no package definition in the required file), I expect a test to call a fully qualified routines from the required package to fail.

ok( ! &working_l::setlist, "calling undefined routine fails" ); --- Undefined subroutine &working_l::setlist called at working.t line 33. # Child (calling undefined subs should not work) exited without ca +lling finalize() not ok 3 - calling undefined subs should not work # Failed test 'calling undefined subs should not work' # at C:/Dwimperl/perl/lib/Test/Builder.pm line 252. # Tests were run but no plan was declared and done_testing() was not s +een.

The test appears to exit where I want it to return false here, and continue. The error seems to be fatal. Do I need to start wrapping evals, or which tests should I be making here?


In reply to Test on calling undefined subs fails and exits test by Don Coyote

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.