5 unshift @INC, '../lib';
6 require Config; import Config;
7 if ($Config{'extensions'} !~ /\bFile\/Glob\b/i) {
14 print "not ok 1\n" unless $loaded;
18 *CORE::GLOBAL::glob = sub { "Just another Perl hacker," };
22 if ("Just another Perl hacker," ne (<*>)[0]) {
24 Your version of perl ($]) doesn't seem to allow extensions to override
25 the core glob operator.
30 use File::Glob ':globally';
36 print "not " if $_ ne 'lib/*.t';
39 # we should have at least basic.t, global.t, taint.t
40 print "# |@r|\nnot " if @r < 3;
43 # check if <*/*> works
45 # at least t/global.t t/basic.t, t/taint.t
46 print "not " if @r < 3;
50 # check if scalar context works
52 while (defined($_ = <*/*.t>)) {
56 print "not " if @r != $r;
59 # check if array context works
65 print "not " if @r != $r;
68 # test if implicit assign to $_ in while() works
74 print "not " if @r != $r;
77 # test if explicit glob() gets assign magic too
79 while (glob '*/*.t') {
83 print "not " if "@r" ne "@s";
86 # how about in a different package, like?
88 use File::Glob ':globally';
90 while (glob '*/*.t') {
94 print "not " if "@r" ne "@s";
97 # test if different glob ops maintain independent contexts
109 print "not " if "@r" ne "@s" or not $i;