X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Ftaint.t;fp=t%2Ftaint.t;h=8ca13461f30e719bafb801e5860e539c71722478;hb=5ae49e269f33276abfc59fe5446aa3e02fa8699f;hp=0000000000000000000000000000000000000000;hpb=631ccfb53a6b3d5960e11312a366276931e25f65;p=p5sagit%2FModule-Metadata.git diff --git a/t/taint.t b/t/taint.t new file mode 100644 index 0000000..8ca1346 --- /dev/null +++ b/t/taint.t @@ -0,0 +1,20 @@ +#!/usr/bin/perl -T +use strict; +use warnings; + +use 5.008000; # for ${^TAINT} +use Module::Metadata; +use Test::More; +use Test::Fatal; + +ok(${^TAINT}, 'taint flag is set'); + +# without the fix, we get: +# Insecure dependency in eval while running with -T switch at lib/Module/Metadata.pm line 668, line 15. +is( + exception { Module::Metadata->new_from_module( "Module::Metadata" )->version }, + undef, + 'no exception', +); + +done_testing;