Menu

#2 Missing qw in EXPORT_OK in WWW.pm

1.0
closed
nobody
None
2015-12-08
2015-12-08
Anonymous
No

Note the missing qw in file https://api.metacpan.org/source/SMITHFARM/App-MFILE-WWW-0.137/lib/App/MFILE/WWW.pm for @EXPORT_OK

our $VERSION = '0.137';
our @EXPORT_OK = ( $VERSION );

should be

our $VERSION = '0.137';
our @EXPORT_OK = qw( $VERSION );

Discussion

  • Anonymous

    Anonymous - 2015-12-08

    Thanks for the bug report, Anonymous!

    That said, I'm not sure it's a bug - at least in Perl 5.12 and above, which is what I'm using. Play with the following code snippet:

    #!/usr/bin/perl
    
    package A;
    
    our $inaccessible = 'Cannot see me';
    our $VERSION = '0.1337';
    
    # the following three lines are interchangeable
    #our @EXPORT_OK = qw( $VERSION );
    #our @EXPORT_OK = ( $VERSION );
    our @EXPORT_OK = $VERSION;
    
    package B;
    
    use warnings;
    
    print $A::innaccessible; # warning 
    print $A::VERSION;       # OK
    
    print "\n";
    
     
  • Smith Farm

    Smith Farm - 2015-12-08
    • status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel