On Thu, Sep 14, 2000 at 05:31:44PM -0500, David L. Nicol wrote:
> A possibility that does not appear in RFC222.1 is to put tho whole
> accessor expression inside curlies:
> 
>       print "Today's weather will be ${weather->temp} degrees and sunny.";
> 
> which would follow the "You want something funny in your interpolated
> scalar's name or reference, you put it in curlies" rule.  Since the contents
> of that expression is not strictly \w+ it does not get interpreted as
> the symbol table lookup ${'weather->temp'}, so that is not a problem, nor
> are the whitespace situations listed in the CAVEATS section.

Could you write up some practical examples where this might be useful
(slapping whitespace between the -> and method name isn't practical or
useful).  I'm loathe to muddle the meaning of ${bareword}.

It did make me think of something else.  What about by-variable method
calls.  That is:

    my $meth = 'species';
    print "How much is that $pet->$meth() in the window?";

This should deparse to:

    my $meth = 'species';
    print "How much is that ".$pet->$meth()." in the window?";


-- 

Michael G Schwern      http://www.pobox.com/~schwern/      [EMAIL PROTECTED]
Just Another Stupid Consultant                      Perl6 Kwalitee Ashuranse
I'm not cute, I'm evil.
        -- Diablo  www.goats.com

Reply via email to