in reply to Re: A lexical lib pragma?
in thread A lexical lib pragma?
Your example does show that the effect of "use lib::lexical" is actually, just like local, dynamic instead of lexical. I wouldn't say "global" as the @INC is indeed is restored at the end of the scope. The secondary effect (or tertiary and so on) can be global and/or irreversible but this is brought upon by other action (do/require/use) and not by "use lib::lexical" or the change to @INC itself. And that can be said about any lexical pragma.
I did originally imagine lib::lexical mainly as a syntax sugar for 'local @INC = (..., @INC)'.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: A lexical lib pragma?
by ikegami (Patriarch) on Jan 04, 2020 at 08:28 UTC |