On Thu, Sep 16, 2004 at 10:35:45PM -0700, Larry Wall wrote:
> Except that only one of these variables' meanings is actually
> associated with subs. And I kind of like to read the C<?> as "which".
> So if we actually make use of our sigils, we get possibilities like this:
>
> $?file Which file am I in?
> $?line Which line am I at?
> $?package Which package am I in?
> @?package Which packages am I in?
> $?module Which module am I in?
> @?module Which modules am I in?
> $?class Which class am I in?
> @?class Which classes am I in?
> $?role Which role am I in?
> @?role Which roles am I in?
> $?grammar Which grammar am I in?
> @?grammar Which grammars am I in?
> &?sub Which sub am I in?
> @?sub Which subs am I in?
> $?sub Which sub name am I in?
> &?block Which block am I in?
> @?block Which blocks am I in?
> $?block Which block label am I in?
>
> Some of those may be sillier than others. But the fact that these all
> contain a C<?> is a good visual indication that they're all potentially
> generic in meaning when you use them in a macro. I kinda like that.
Maybe I'm just being curmudgeonly, but is this really that useful to
have such shortcuts? I presume that there will be alternate ways to
access the same information (like maybe a special hash
(%*WHICH{'package'} and %*WHICH{'file'}) or some other suitable
abstraction (maybe there's an object that represents the program state
that you can query $*PROG.file, $*PROG.line, etc.))
But is it really worth the the secondary sigil?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]