On Wed, 4 Sep 2002 17:29:27 -0400 (EDT), Trey Harris wrote:
> In a message dated Wed, 4 Sep 2002, Jonathan Scott Duff writes:
> > So, each time I use a hypothetical, I have to be concious of which
> > variables are currently in scope?  Perl can't help be with this task
> > because how does it know if I meant to hypothetically clobber that
> > lexical or store something in the match object.  This is only really a
> > problem if you expect "let" variables to always show up in the match
> > object and sometimes they don't.  So why not make it so that "let"
> > also always causes these variables to appear in the match object?
> 
> It should.  I think everyone has been proceeding under the assumption that
> they are.  If you use a variable name already defined, then you set both
> the match object's attribute of the same name (minus the sigil if sigil is
> '$') *and* the external variable.

That was certainly my assumption, and I'm fine with that. However, what if,
for some reason, you don't want to set the lexical which happens to be in
scope. Or if you do, but you spell it wrong? There needs to be some way of
indicating whether or not the lexical gets set - that way the strict pragma
(or perl6 equivalent) can catch typos.

-- 
        Peter Haworth   [EMAIL PROTECTED]
"To be considered half as good as Microsoft,
 Linux has to work twice as fast.
 Fortunately, this is easy."

Reply via email to