This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
perlapi: Place in dictionary sort order
[perl5.git]
/
lib
/
perl5db
/
t
/
taint
1
#!/usr/bin/perl -T
2
#
3
# This code is used by lib/perl5db.t !!!
4
#
5
use Scalar::Util qw(tainted);
6
7
# [perl #76872] don't taint $DB::sub
8
9
sub f {}
10
11
BEGIN {
12
print "[\$^X]" if tainted($^X);
13
($^X || 1) && f(); # maybe taint $DB::sub;
14
print "[\$DB::sub]" if tainted($DB::sub);
15
}
16
print "[done]";
17