Update 1: I just noticed one can use an option -ignore to skip certain files when using Devel::Cover. I will check if this works for me.

Update 2: Did not work for me, I suspect the option only determines for which files reports are being generated, but please correct me if I am wrong.

---------------

Dear fellow monks,

I was trying to run build testcover for one of my modules and it failed. If I understood the error message correctly, the reason was that a module I use (DBIx::Class::Schema::Loader) is not taint-safe, but maybe I mis-read the error messages. If it really is the case that the used module is the reason for the current problem, I would be very interested to know about what I can do to run build testcover anyway. Since I am only interested in coverage of my own module, it would be nice if an external dependency would not prevent testing this.

I reproduced the problem with a quite minimal example, creating a distribution with a package of name "Test::DbicTaint" using Module::Starter and only adding the external Module to the prerequisites, i.e. in build.PL we have

... requires => { 'DBIx::Class::Schema::Loader' => 0, # <----- added line }, ...

and in DbicTaint.pm there is the additional line "use DBIx::Class::Schema::Loader;".

Even with this setup, I got the following error message (xubuntu, Perl 5.14.2 / also Windows 7, Strawberry Perl 5.16.2.1:

jose@jose-Aspire-1410:~/temp/perl/Test-DbicTaint$ ./Build testcover t/00-load.t ....... 1/? # Failed test 'use Test::DbicTaint;' # at t/00-load.t line 10. Bailout called. Further testing stopped: # Tried to use 'Test::DbicTaint'. # Error: Insecure dependency in eval while running with -T switch + at /usr/local/lib/perl/5.14.2/Params/Util.pm line 167. # Compilation failed in require at /usr/local/share/perl/5.14.2/Packag +e/DeprecationManager.pm line 11. # BEGIN failed--compilation aborted at /usr/local/share/perl/5.14.2/Pa +ckage/DeprecationManager.pm line 11. # Compilation failed in require at /usr/local/share/perl/5.14.2/Packag +e/Stash.pm line 56. # BEGIN failed--compilation aborted at /usr/local/share/perl/5.14.2/Pa +ckage/Stash.pm line 56. # Compilation failed in require at /usr/local/share/perl/5.14.2/namesp +ace/clean.pm line 6. # BEGIN failed--compilation aborted at /usr/local/share/perl/5.14.2/na +mespace/clean.pm line 6. # Compilation failed in require at /usr/local/share/perl/5.14.2/DBIx/C +lass/Carp.pm line 18. # BEGIN failed--compilation aborted at /usr/local/share/perl/5.14.2/DB +Ix/Class/Carp.pm line 18. # Compilation failed in require at /usr/local/share/perl/5.14.2/DBIx/C +lass/Exception.pm line 6. # BEGIN failed--compilation aborted at /usr/local/share/perl/5.14.2/DB +Ix/Class/Exception.pm line 6. # Compilation failed in require at /usr/local/share/perl/5.14.2/DBIx/C +lass/Schema.pm line 6. # BEGIN failed--compilation aborted at /usr/local/share/perl/5.14.2/DB +Ix/Class/Schema.pm line 6. # Compilation failed in require at (eval 65)[/usr/share/perl/5.14/base +.pm:90] line 2. # ...propagated at /usr/share/perl/5.14/base.pm line 93. # BEGIN failed--compilation aborted at /usr/local/share/perl/5.14.2/DB +Ix/Class/Schema/Loader.pm line 5. # Compilation failed in require at /home/jose/temp/perl/Test-DbicTaint +/blib/lib/Test/DbicTaint.pm line 7. # BEGIN failed--compilation aborted at /home/jose/temp/perl/Test-DbicT +aint/blib/lib/Test/DbicTaint.pm line 7. # Compilation failed in require at (eval 64)[/usr/share/perl/5.14/Test +/More.pm:885] line 2. # BEGIN failed--compilation aborted at (eval 64)[/usr/share/perl/5.14/ +Test/More.pm:885] line 2. Use of uninitialized value $Test::DbicTaint::VERSION in concatenation +(.) or string at t/00-load.t line 13. # Looks like you failed 1 test of 1. # Looks like your test exited with 255 just after 1. FAILED--Further testing stopped.
José

In reply to build testcover fails because of non taint-safe used module by jds17

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.