On Wed, Apr 20, 2005 at 05:19:16PM -0500, David Nicol wrote: > On 4/20/05, Dave Mitchell <[EMAIL PROTECTED]> wrote: > > > > > Adding a warning would warn on the following: > > > > sub log { print LOG @_ } > > ... > > open LOG, '>>log'; > > No it wouldn't. C<<print>> takes C<<LOG>> as it's first argument, > not rearranging into C<<LOG->print(@_)>>. (Or I am being naive again.)
Well, syntactically print LOG @_ is still inderect object synatx, but because print is a built-in, the tokeniser handl;es it slightly differently. How about this example then: sub log { myprint LOG @_ } ... open LOG, '>>log'; > The current version of the feature I am requesting (and would be willing to > write the patch myself, if assured that it will get accepted) is, Well personally I wouldn't accept it; I don't speak for the pumpkings though. > when NEWTOKEN1 NEWTOKEN2 ... is parsed into NEWTOKEN2->NEWTOKEN1(...), a > check will be made to verify that NEWTOKEN2 appears as an existing > namespace, failure resulting in a syntax-bareword warning, which will be > handled appropriately within the existing warnings/stricture framework. -- Now is the discount of our winter tent -- sign seen outside camping shop