5 unshift @INC, '../lib';
10 print "not ok 1\n" unless $loaded;
14 *CORE::GLOBAL::glob = sub { "Just another Perl hacker," };
18 if ("Just another Perl hacker," ne (<*>)[0]) {
20 Your version of perl ($]) doesn't seem to allow extensions to override
21 the core glob operator.
26 use File::Glob ':globally';
32 print "not " if $_ ne 'lib/*.t';
35 # we should have at least basic.t, global.t, taint.t
36 print "# |@r|\nnot " if @r < 3;
39 # check if <*/*> works
41 # at least t/global.t t/basic.t, t/taint.t
42 print "not " if @r < 3;
46 # check if scalar context works
48 while (defined($_ = <*/*.t>)) {
52 print "not " if @r != $r;
55 # check if array context works
61 print "not " if @r != $r;
64 # test if implicit assign to $_ in while() works
70 print "not " if @r != $r;
73 # test if explicit glob() gets assign magic too
75 while (glob '*/*.t') {
79 print "not " if "@r" ne "@s";
82 # how about in a different package, like?
84 use File::Glob ':globally';
86 while (glob '*/*.t') {
90 print "not " if "@r" ne "@s";
93 # test if different glob ops maintain independent contexts
105 print "not " if "@r" ne "@s" or not $i;