develooper Front page | perl.perl5.porters | Postings from April 2018

[perl #133069] Global variables in Exporter examples

Thread Next
From:
Dan Book
Date:
April 6, 2018 03:34
Subject:
[perl #133069] Global variables in Exporter examples
Message ID:
rt-4.0.24-19521-1522985635-246.133069-75-0@perl.org
# New Ticket Created by  Dan Book 
# Please include the string:  [perl #133069]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=133069 >


The docs for Exporter (https://metacpan.org/pod/Exporter) include several
examples using global variables. These should be declared with 'our' where
appropriate to make the examples strict-safe. Right now this detail is
hidden under the "Good Practices" section but it should be applied to each
example the user sees directly -- remember that newbies are likely to stop
reading once they have copy-pasted something that "works".

-Dan


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About