Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

But that improvement doesn't go far enough. The "," and "#" warnings make me think it would be better to allow escaping inside qw. For example

my @tokens= qw( $ \# ; \, if else else\ if ); # '$' '#' ';' ',' 'if' 'else' 'else if'

The warning should be changed to:

Unescaped ',', '#', or '\' in qw ...

The trick is what level of deference to provide for backward compatibility of unlikely constructs. Silently changing the interpretation of qw( / - \ | ) would be bad. So I'd make qw( \ ) warn for a while before supporting escaped whitespace characters. I don't expect to find \# nor \, inside qw in existing code but maybe qw( \\ ) is slightly more common? That'd be the tough one to deal with.

Maybe just add qqw() that supports escaping? I'd like to be able to even use \n, \t, and \x3e type constructs in qw() on rare occasions.

I guess the current "fix" for the warnings is either no warnings 'qw'; or qw( . ? ! ), ',', qw( ; : ). I dislike the former as it can't distinguish the comma I meant to escape from the comma I slipped in by accident. So I tend to quickly end up replacing qw with quoted strings.

Actually, I'd like qqw to ignore /\s#(\s[^\n]*)?\n/ as my desire to add comments is a common reason I end up replacing qw with quoted strings.

- tye        

In reply to Re^5: Password Generation and Module Multiplication (qw warnings) by tye
in thread Password Generation and Module Multiplication by Orsmo

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [jedikaiti]: Hi Monks

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (8)
    As of 2018-04-19 17:51 GMT
    Find Nodes?
      Voting Booth?