Hi,
For the demo, I have FOO.pm, Makefile.PL and t/01t.t. Here they are:
C:\temp\temp\FOO>type FOO.pm package FOO; $FOO::VERSION = 0.5; 1; C:\temp\temp\FOO>type Makefile.PL use ExtUtils::MakeMaker; WriteMakefile ( NAME => 'FOO', VERSION_FROM => 'FOO.pm', ); C:\temp\temp\FOO>type t\01t.t #!perl -T use FOO; use Test::More tests => 2; is(${^TAINT}, 1, 'taint test'); is($FOO::VERSION, 0.5, 'version test');
When I build that little distro on Win32, perl-5.12.0, all goes well:
C:\temp\temp\FOO>perl makefile.PL Writing Makefile for FOO C:\temp\temp\FOO>dmake test cp FOO.pm blib\lib\FOO.pm C:\perl512_M\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness +(0, 'blib\lib', 'blib\arch')" t/*.t t/01t.t .. ok All tests successful. Files=1, Tests=2, 1 wallclock secs ( 0.09 usr + 0.03 sys = 0.12 CPU +) Result: PASS
But if I then try to run 'perl -T -Mblib t/01t.t', I get:
C:\temp\temp\FOO>perl -T -Mblib t/01t.t Insecure dependency in require while running with -T switch at t/01t.t + line 2. BEGIN failed--compilation aborted at t/01t.t line 2. C:\temp\temp\FOO>
What do I need to do in order that 'perl -T -Mblib t/01t.t' works as expected ?
Preferably, there will be some simple modification I can make to t/01t.t ... but if that's unrealistic, then I might be open to other approaches. However, if the "other approaches" are too cumbersome, then I probably just won't worry about it at all :-)

Cheers,
Rob

In reply to Running with -T and -Mblib by syphilis

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.