diff options
Diffstat (limited to 'cpan/Module-Metadata/t/taint.t')
-rw-r--r-- | cpan/Module-Metadata/t/taint.t | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cpan/Module-Metadata/t/taint.t b/cpan/Module-Metadata/t/taint.t new file mode 100644 index 0000000000..8ca13461f3 --- /dev/null +++ b/cpan/Module-Metadata/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, <GEN0> line 15. +is( + exception { Module::Metadata->new_from_module( "Module::Metadata" )->version }, + undef, + 'no exception', +); + +done_testing; |