From: Gurusamy Sarathy Date: Mon, 1 Sep 2003 02:25:41 +0000 (-0700) Subject: glob() bug X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f444d49658e3e31ba2664f713eb9290d716237e9;p=p5sagit%2Fp5-mst-13.2.git glob() bug Message-Id: <200309010925.h819Pf0X011457@smtp3.ActiveState.com> p4raw-id: //depot/perl@20980 --- diff --git a/op.c b/op.c index a4b20e7..d859e2a 100644 --- a/op.c +++ b/op.c @@ -5311,7 +5311,7 @@ Perl_ck_glob(pTHX_ OP *o) #if !defined(PERL_EXTERNAL_GLOB) /* XXX this can be tightened up and made more failsafe. */ - if (!gv) { + if (!(gv && GvCVu(gv) && GvIMPORTED_CV(gv))) { GV *glob_gv; ENTER; Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT, diff --git a/t/run/fresh_perl.t b/t/run/fresh_perl.t index 1fd4417..081c386 100644 --- a/t/run/fresh_perl.t +++ b/t/run/fresh_perl.t @@ -822,5 +822,20 @@ It's good! >A< >B< $_="foo";utf8::upgrade($_);/bar/i,warn$_; EXPECT foo at - line 1. - - +######## glob() bug Mon, 01 Sep 2003 02:25:41 -0700 <200309010925.h819Pf0X011457@smtp3.ActiveState.com> +-lw +print glob(q(./"TEST")); +use File::Glob; +print glob(q(./"TEST")); +EXPECT +./"TEST" +./"TEST" +######## glob() bug Mon, 01 Sep 2003 02:25:41 -0700 <200309010925.h819Pf0X011457@smtp3.ActiveState.com> +-lw +use File::Glob; +print glob(q(./"TEST")); +use File::Glob; +print glob(q(./"TEST")); +EXPECT +./"TEST" +./"TEST"