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

Re: [perl #93640] Allow comments in qw()

Thread Previous | Thread Next
Ricardo Signes
June 30, 2011 13:56
Re: [perl #93640] Allow comments in qw()
Message ID:
* Jesse Vincent <> [2011-06-30T13:25:18]
> On Mon 27.Jun'11 at 12:38:28 -0700, Eric Brine wrote:
> > Patch 3:
> > 
> > Add feature qw_comments, which allows comments to be used in the qw()
> > operator.
> I'm not in favor of this one. It breaks my assumptions about
> what qw means. (Those being "This text will be split on whitespace
> boundaries but otherwise won't be touched")

I am not in favor of this change, but I will play devil's advocate very very

  Aren't comments sometimes just line-ending whitespace?

My initial reply was going to be: I don't like making qw special, why not
comments in multiline qq strings?  But then the problem is that you don't know
what to do here:

  my $x = qq{
    # bar

Are the two whitespace lines before # in the string itself?  This isn't a
problem in qw, where the whitespace is already gone.  Then again, it isn't in
qx, either...

Yup.  Still not in favor of this change, either.


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