xref: /openbsd-src/gnu/usr.bin/perl/cpan/Test-Harness/t/sample-tests/shbang_misparse (revision b39c515898423c8d899e35282f4b395f7cad3298)
1#!/usr/bin/perl-latest
2
3# The above #! line was misparsed as having a -t.
4# Pre-5.8 this will simply cause perl to choke, since there was no -t.
5# Post-5.8 taint warnings will mistakenly be on.
6
7print "1..2\n";
8print "ok 1\n";
9my $warning = '';
10$SIG{__WARN__} = sub { $warning .= $_[0] };
11eval( "#" . substr( $0, 0, 0 ) );
12print $warning ? "not ok 2\n" : "ok 2\n";
13