develooper Front page | perl.perl5.porters | Postings from December 2017

Re: Urgent subroutine signatures problems

Thread Previous | Thread Next
Paul "LeoNerd" Evans
December 13, 2017 17:26
Re: Urgent subroutine signatures problems
Message ID:
On 13 Dec 2017 16:53:49 -0000
Father Chrysostomos <> wrote:

> No.  Unlike prototypes, signatures are properly parsed, allowing
> things like ($a=")"), and even ($a=do{ BEGIN { ... } }), which pretty
> much rules out any two-pass parsing.

Ah; in that case I guess the only real option is to allow :lvalue
upfront, before the signature then.

  sub foo :lvalue ($self) { $self->{foo} }

I wonder, would that look better ordered

  sub :lvalue foo($self) { $self->{foo} }


Paul "LeoNerd" Evans      |  |

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About