Menu

#708 Formatting of `qw` is not working as expected

v0.7.x
open
nobody
None
5
2019-10-04
2019-10-04
John
No

Formatting of qw is not working as expected

use strict;
no strict qw / refs/;
use warnings;
use utf8;

use CGI qw /:standard/;
use DateTime::Format::ISO8601;
use DBD::mysql;
use DBI;
use Encode qw / encode_utf8/;
use HTTP::Request qw / /;
use HTTP::Request::Common qw / GET POST/;
use IO::Handle  qw / input_record_separator/;
use JSON qw / encode_json decode_json/;
use LWP::Simple qw / get/;
use LWP::Debug  qw /+conns/;
use LWP::UserAgent;
use Math::Random::Secure qw / irand/;
use MIME::Base64  qw / /;
use POSIX  qw / strftime/;
use String::Random;

( see the attached screenshot )

1 Attachments

Discussion

  • John

    John - 2019-10-04

    Some observations:

    works properly:

    use Encode qw / encode_utf8/;
    

    works properly:

    use Encode qw ( encode_utf8);
    

    doesn't work properly:

    use CGI qw /:standard/;
    

    works properly:

    use CGI qw (:standard);
    

    doesn't work properly:

    use HTTP::Request qw / /;
    

    works properly:

    use HTTP::Request qw ( );
    

    doesn't work properly:

    use HTTP::Request::Common qw / GET POST/;
    

    works properly:

    use HTTP::Request::Common qw ( GET POST);
    
     
  • John

    John - 2019-10-04

    It looks like qw ( LIST ) works properly always, but qw / LIST / works properly only if the LIST contains odd number of entities.

    Furhtermore, qw /:standard/ doesn't work, althought the LIST contains just odd number of entities, however qw / strftime/ works fine, as well as qw /+conns/, so in this particular case the : character seems to be the one that cause the problem.

     

Log in to post a comment.

MongoDB Logo MongoDB