in reply to lvalue subs of a run-time persuasion

I believe that lvalue-able subs are on the wish list but I don't think they are available today. And I'm pretty darn certain they wouldn't use a syntax like that.

update: open mouth, insert foot. Pretty sleek stuff, I gotta start reading the perldocs from 5.6 rather than the elder versions...

--
$you = new YOU;
honk() if $you->love(perl)

  • Comment on Re: lvalue subs of a run-time persuasion

Replies are listed 'Best First'.
Re: Re: lvalue subs of a run-time persuasion
by MeowChow (Vicar) on Dec 06, 2000 at 09:01 UTC
    Perl 5.6 already has them (although it's labeled "experimental"), and they do use the above syntax (minus the eval stuff, which is needed to define and compile sub code at run-time). More specifically:
    sub mysub : lvalue { $myvar; }
    Check out perlsub for a more thorough discussion.
      I didn't know they had turned em on without a compile time flag. Cool. The syntax still sucks. I thought there was a raging argument on that...

      --
      $you = new YOU;
      honk() if $you->love(perl)