one problem with lexical scope is also POSIX::strerror. currently it's implemented using strerror => 'errno => local $! = $_[0]; "$!"', thus it has to be fixed too if we implement lexical featurization. 2013/9/1 Zefram <zefram@fysh.org> > Karl Williamson wrote: > >Within its scope Perl attempts to decode $! as best it can, > > Scoping doesn't work well for this sort of thing. The decoding happens in > get magic, when the variable is being read. If that behaviour is affected > by the lexical scope in which the reading happens, this means that > different readers will see different values in the same variable, which > is awfully confusing if a reference to the variable gets passed around. > Worse, XS code gets the behaviour of *its caller's* lexical scope. > > Amusingly, $[ used to influence $#foo magic variables in this manner. > It's one of the reasons I'm glad we got rid of $[. > > -zefram >Thread Previous | Thread Next