develooper Front page | perl.perl5.porters | Postings from October 2015

Warn about unexpected POD?

Thread Next
Paul "LeoNerd" Evans
October 28, 2015 16:20
Warn about unexpected POD?
Message ID:
I encountered the following:

  $ perl
  use strict;
  use warnings;
  push our @EXPORT, qw( foo )

  =head2 foo

    $result = foo()->get;


  Global symbol "$result" requires explicit package name at - line 7.

I know that perlpod(1) mentions that POD can't appear within statements
and only between them, but I wonder to what extent this could be turned
into a warning of some kind? It might be nice to get a clue that looked
something like

  Possible attempt to embed POD within an expression at - line 5.

before it reported on the syntax error on a later line. Otherwise, that
missing semicolon might not be so obvious as the reason.

Paul "LeoNerd" Evans  |

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