in reply to 5.10: Are scoped constants possible?
No scoped constant pragma (yet).
Since constants are implemented (still) as subroutines subject to inlining which occupy a CODE slot in the symbol table, there's no such thing until lexical globs are implemented (you wrote the primary patch for that).
Just trying reveals:
#!/usr/local/bin/perl5.10.0 use constant FOO => 'quux'; { use constant FOO => 'bar'; } my $foo = FOO; print $foo,"\n"; __END__ Constant subroutine main::FOO redefined at /usr/local/lib/perl5/5.10.0 +/constant.pm line 115. bar
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|