This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Refactor inccode.t to use is_miniperl() instead of $ENV{PERL_CORE_MINITEST}
[perl5.git] / lib / perl5db / t / taint
CommitLineData
07004ebb
DM
1#!/usr/bin/perl -T
2#
3# This code is used by lib/perl5db.t !!!
4#
5use Scalar::Util qw(tainted);
6
7# [perl #76872] don't taint $DB::sub
8
9sub f {}
10
11BEGIN {
12 print "[\$^X]" if tainted($^X);
13 ($^X || 1) && f(); # maybe taint $DB::sub;
14 print "[\$DB::sub]" if tainted($DB::sub);
15}
16print "[done]";
17