llancet has asked for the wisdom of the Perl Monks concerning the following question:

I'm writing a module with XS contents. It failed on a simple test which creates an object, but the error message are eaten by the Build script. In addition, I cannot just run the test script by "perl t/XXX.t", because the .so files under blib/arch/auto cannot be found by perl, and I don't know how to let perl found them. So, how can I run my test scripts and get the error messages?
  • Comment on How to run "Build test" showing text outputs?

Replies are listed 'Best First'.
Re: How to run "Build test" showing text outputs?
by davido (Cardinal) on Jan 08, 2014 at 05:36 UTC

    perl -Mblib t/xxx.t, or prove -bv t/xxx.t

    The blib module tells Perl to look in ./blib for library files. The "-b" flag for prove tells prove to invoke the -Mblib semantics.


    Dave

Re: How to run "Build test" showing text outputs?
by syphilis (Archbishop) on Jan 08, 2014 at 05:35 UTC
    I cannot just run the test script by "perl t/XXX.t", because the .so files under blib/arch/auto cannot be found by perl

    The usual way is to run the test script as "perl -Mblib t/XXX.t".

    Cheers,
    Rob
Re: How to run "Build test" showing text outputs?
by MidLifeXis (Monsignor) on Jan 08, 2014 at 14:21 UTC

    Could also do prove -Ilib t/XXX.t --verbose.

    Never mind. Didn't read davidio's answer completely.

    --MidLifeXis

Re: How to run "Build test" showing text outputs?
by llancet (Friar) on Jan 09, 2014 at 12:22 UTC
    Thanks everyone! I found that "auto" is searched via @INC, thus it can also be run via:
    perl -Iblib/arch -Iblib/lib XXX.t
      -Mblib does that for you