5 @INC = ('.', '../lib');
8 # don't make this lexical
14 write_file('bleah.pm',@_);
15 eval { require "bleah.pm" };
16 my @a; # magic guard for scope violations (must be first lexical in file)
21 open(REQ,">$f") or die "Can't write '$f': $!";
26 # interaction with pod (see the eof)
27 write_file('bleah.pm', "print 'ok $i\n'; 1;\n");
31 # run-time failure in require
33 print "# $@\nnot " unless $@ =~ /did not return a true/;
34 print "ok ",$i++,"\n";
36 # compile-time failure in require
38 # bison says 'parser error' instead of 'syntax error',
39 # various yaccs may or may not capitalize 'syntax'.
40 print "# $@\nnot " unless $@ =~ /(syntax|parser) error/i;
41 print "ok ",$i++,"\n";
45 print "# $@\nnot " if $@;
46 print "ok ",$i++,"\n";
48 END { unlink 'bleah.pm'; }
50 # ***interaction with pod (don't put any thing after here)***