So it just ignores everything after the /(not )?ok( \d+)/ and I can put my commentary right there, or after some other separator like a dash?

Yup. from Test::Harness docs:

test names Anything after the test number but before the # is considered to be the name of the test. ok 42 this is the name of the test Currently, Test::Harness does nothing with this infor- mation.
I suppose I made it to that point, now?

Yup. Your ready for Test::More :-)

Here's a quick re-write of your test script in the Test::More idiom.

use strict; use warnings; use lib 't'; # assume run by "make test" so this should work use File::Spec; use Test::More tests => 28; BEGIN { unless ($ENV{TEST_VERBOSE}) { # silence the --verbose and --dump stuff open (my $f, '>', File::Spec->devnull()); require Exporter::VA; *Exporter::VA::VERBOSE= $f; }; }; sub verify { my ($code, $expected) = @_; my $test_name = "calling { $code } "; my $result= eval $code; if ($@) { fail($test_name); diag("died with $@"); } else { is $result, $expected, $test_name; }; } ## Test basic export features. { package C1; use M1 v1.0 qw/--verbose_import &foo bar baz quux bazola $ztesch - +-dump/; } verify "C1::foo (5)", "Called M1::foo (5)."; verify "C1::bar (6)", "Called M1::internal_bar (6)."; verify "C1::baz (7)", "Called M1::baz (7)."; verify "C1::quux (8)", "Called M1::quux (8)."; verify "C1::bazola (9)", "Called dynamically-generated M1::&bazola ask +ed for by C1, with parameters (9)."; verify '$C1::ztesch=10; ++$M1::ztesch; $C1::ztesch == 11', "1"; ## Test .plain and tags { package C2; use M2 v1.0 qw/ foo baz $ztesch :tag1/ }; verify "C2::foo (12)", "Called M2::foo (12)."; verify "C2::baz (13)", "Called M2::baz (13)."; verify '$C2::ztesch=14; ++$M2::ztesch; $C2::ztesch == 15', "1"; verify "C2::quux (16)", "Called M2::quux (16)."; verify "C2::bazola (17)", "Called M2::baz (17)."; verify "C2::thud (18)", "Called M2::baz (18)."; verify "C2::grunt (19)", "Called M2::baz (19)."; ## Test version-list exports { package C3; use M3 qw/--verbose_import foo :blarg/ }; verify "C3::foo (20)", "Called M3::old_foo (20)."; verify "C3::bar (22)", "Called M3::bar (22)."; ## Make sure different clients can use different versions { package C4; use M3 v2.1 qw/:tag/ }; # more levels of indirection verify "C4::foo (21)", "Called M3::new_foo (21)."; { package C5; use M3 v1.5.1 qw/foo/ }; verify "C5::foo (23)", "Called M3::middle_foo (23)."; ## Make sure we use a :DEFAULT. { package C6; use M2 }; verify "C6::foo (24)", "Called M2::foo (24)."; verify "C6::thud (25)", "Called M2::baz (25)."; ## Pragma names may be non-identifiers # (also tests pragma extracting arguments) # (also tests that return value from callback is ignored if symbol beg +ins with dash) { package C7; our $output; use M2 'foo', '-pra#ma!', \$output, 'baz' } +; verify "C7::foo (26)", "Called M2::foo (26)."; verify "C7::baz (27)", "Called M2::baz (27)."; verify "\$C7::output", "-pra#ma!"; # check the behavior of normalize_vstring use Exporter::VA 'normalize_vstring'; sub vv { my ($x, $answer)= @_; is normalize_vstring($x), $answer, "normalised $x"; } vv (v1.2.3, v1.2.3); vv ('', v0); vv (v3.2.1.0, v3.2.1); vv (v1.0.0.0, v1.0); vv (2.3, v2.3); vv ('2.3.4', v2.3.4); # check floating-point version specifier on use line package C8; use M3 2.4; # >> if it worked, it took 2.4 as v2.4, not v50.46.52 or v2.400. # >> later, check my client desired version. How can I do that from " +outside"? # >> well, have M3 export a function that I can use to ask from the "i +nside".

Hopefully this comes across as simpler than the original :-)


In reply to Re^9: Makefile.PL even weirder on Windows by adrianh
in thread Makefile.PL even weirder on Windows by John M. Dlugosz

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.