On Thu, Sep 16, 2004 at 01:40:47PM -0600, Luke Palmer wrote:
: Larry Wall writes:
: > I like $-, $+, and $? the best. Probably should save $- and $+ for something
: > complimentary, which leaves $?. It's visually distinctive, and recently
: > came available. :-)
:
: Hmm, $& is pretty good, and it's associated with subs mnemonically, just
: as $= is associated with lines (but a little more visually in that
: case).
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.
: I just wonder whether people will get confused between these:
:
: $&sub
: &$sub
The real killer is &&sub.
Larry