Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

build testcover fails because of non taint-safe used module

by jds17 (Pilgrim)
on Dec 31, 2012 at 13:08 UTC ( #1011058=perlquestion: print w/ replies, xml ) Need Help??
jds17 has asked for the wisdom of the Perl Monks concerning the following question:

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ť

Comment on build testcover fails because of non taint-safe used module
Select or Download Code
Re: build testcover fails because of non taint-safe used module
by pjcj (Novice) on Jan 06, 2013 at 01:16 UTC
    Hello Josť, Congratulations, you have found a bug! I've added it as https://github.com/pjcj/Devel--Cover/issues/41 and then I fixed it as https://github.com/pjcj/Devel--Cover/commit/929b7fa This will be in the next release, or if you can't wait that long grab it from github and use that. If you still have problems, please reopen the ticket.

      Hello Paul,

      thank you for fixing it! I just tested with the current version on GitHub (929b7faeee...) and it works fine for me.

      Josť

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1011058]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2014-07-23 06:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (133 votes), past polls