develooper Front page | perl.perl5.porters | Postings from June 2013

RFC: Any objections to preserving spaces in prototypes?

Thread Next
From:
Peter Martini
Date:
June 27, 2013 11:41
Subject:
RFC: Any objections to preserving spaces in prototypes?
Message ID:
CAFyW6MTjP22HSWaUYPXnT7qvTD0Gg94rn1pVFGeJUPsHtWKfGA@mail.gmail.com
The current and perhaps original implementation of prototypes in Perl
has the tokenizer stripping spaces from a prototype before saving it,
so

sub foo(   $   ){}

actually gets saved with a prototype of '$' instead of '   $   '

I'd like to change that so it saves and returns the prototype as it
was written.  This is a change in behavior for the 'prototype' builtin
- undocumented behavior, as far as I can see - so I wanted to get
other opinions on it.

Thoughts?

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About