| 1 | #!./perl
|
|---|
| 2 |
|
|---|
| 3 | BEGIN {
|
|---|
| 4 | chdir 't' if -d 't';
|
|---|
| 5 | @INC = '.';
|
|---|
| 6 | push @INC, '../lib';
|
|---|
| 7 | }
|
|---|
| 8 |
|
|---|
| 9 | # don't make this lexical
|
|---|
| 10 | $i = 1;
|
|---|
| 11 |
|
|---|
| 12 | my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0;
|
|---|
| 13 | my $Is_UTF8 = (${^OPEN} || "") =~ /:utf8/;
|
|---|
| 14 | my $total_tests = 31;
|
|---|
| 15 | if ($Is_EBCDIC || $Is_UTF8) { $total_tests -= 3; }
|
|---|
| 16 | print "1..$total_tests\n";
|
|---|
| 17 |
|
|---|
| 18 | sub do_require {
|
|---|
| 19 | %INC = ();
|
|---|
| 20 | write_file('bleah.pm',@_);
|
|---|
| 21 | eval { require "bleah.pm" };
|
|---|
| 22 | my @a; # magic guard for scope violations (must be first lexical in file)
|
|---|
| 23 | }
|
|---|
| 24 |
|
|---|
| 25 | sub write_file {
|
|---|
| 26 | my $f = shift;
|
|---|
|
|---|