I'm taken with Test::Trap, I can be a little clearer with what is happening in the test names.

The sub leaves by dieing and not exiting. And it is starting to look like the finalize() routine is a test module death. But I already knew that of course

subtest 'calling undefined routine dies' => sub { my @r = trap{ working_l::setlist() }; is( $trap->leaveby, 'die', "calling &working_l::setlist dies" ); like( $trap->die, qr/(?=.*finalize)/i, "&working_l::setlist dies with + finalize err" ); }; ---output--- ok 1 - require 'working_l.pl'; ok 2 # skip workinprogress ok 1 - calling &working_l::setlist dies not ok 2 - &working_l::setlist dies with finalize err # Failed test '&working_l::setlist dies with finalize err' # at working.t line 36. # 'Undefined subroutine &working_l::setlist call +ed at working.t line 33. # ' # doesn't match '(?^i:(?=.*finalize))' 1..2 # Looks like you failed 1 test of 2.

In reply to Re^2: Test on calling undefined subs fails and exits test by Don Coyote
in thread 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.