On Thu, Aug 02, 2012 at 03:59:54PM +0100, Nicholas Clark wrote: > Yes, given that we already have different meanings for interior sequences of > multiple pairs of colons within the bareword between modules and packages, > I'm comfortable that it is consistent to make require with any number of > paired leading colons an error. > > (I believe that odd numbers of colons are already an error. Hence my phrasing) I'm just reviving this 4-year old thread concerning what to do about 'require ::Foo::Bar'. I could have sworn we had already fixed this, but it turns out not. I think a consensus had been reached in this thread that a bareword require with any combination of at least 2 leading colons should just die. In the branch smoke-me/davem/require that I've just pushed, I've rebased and tweaked Nicholas's original branch, and added an extra commit that converts anything starting with 2 colons into an error: $ perl -e'require ::Foo::Bar' Bareword in require must not start with a double-colon: "::Foo::Bar" $ (Unlike the similar work in cperl, I've added a specific new error message, and made the offending module name be displayed pre-conversion to a pathname.) If this is ok, should it go in before 5.24? -- It's not that I'm afraid to die, I just don't want to be there when it happens. -- Woody AllenThread Previous | Thread Next