Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

To be honest, I was surprised to find that it was still valid in v5.34 — thanks for the info.

I had written, "I haven't used [it] in over 20 years"; upon reflection, I believe my last usage was probably in 1996 or 1997; so that's closer to a quarter of a century.

The message, to which you linked, had "... $user's problem ...", followed by "This bites experts and new users alike ...". I suspect I could have been one of those bitten, if reviewing another's code without "use warnings;". In v5.28, a new warning was added: see "perl5280delta: New Warnings" and "perldiag: Old package separator used in string". My normal code would be something along these lines:

ken@titan ~/tmp $ cat pm_11137628_pkg_sep_in_string.pl use strict; use warnings; my $user = 'ken'; print "... $user's problem ...\n";

which, when run, gives me ample feedback:

ken@titan ~/tmp $ perl -v This is perl 5, version 34, subversion 0 (v5.34.0) built for cygwin-th +read-multi ... ken@titan ~/tmp $ perl pm_11137628_pkg_sep_in_string.pl Old package separator used in string at pm_11137628_pkg_sep_in_string. +pl line 6. (Did you mean "$user\'s" instead?) Name "user::s" used only once: possible typo at pm_11137628_pkg_sep_in +_string.pl line 6. Use of uninitialized value $user::s in concatenation (.) or string at +pm_11137628_pkg_sep_in_string.pl line 6. ... problem ...

I don't have anything earlier than v5.30 on that system:

$ perlbrew list * perl-5.34.0 perl-5.33.5 perl-5.32.0 perl-5.30.0

However, on another OS:

C:\Users\ken\tmp>perl -v This is perl 5, version 26, subversion 3 (v5.26.3) built for MSWin32-x +64-multi-thread ... C:\Users\ken\tmp>perl pm_11137628_pkg_sep_in_string.pl Name "user::s" used only once: possible typo at pm_11137628_pkg_sep_in +_string.pl line 6. Use of uninitialized value $user::s in concatenation (.) or string at +pm_11137628_pkg_sep_in_string.pl line 6. ... problem ...

Not quite as "ample" feedback. I expect I could work it out from here; others might be saying frustratedly: 'But there is no "user::s" in my code'.

I read through about the first dozen NNTP messages. Most discussion seemed to be about whether removal should be partial or complete, and backward-compatibility. When I got to https://www.nntp.perl.org/group/perl.perl5.porters/2021/08/msg261321.html and read "... disks of infinite size coming free with a packet of corn flakes ...", I had a chuckle and left it there. I wouldn't personally have any problem if the old style package separator was removed permanently and completely.

— Ken


In reply to Re^7: POD for use feature 'declared_refs' wrong by kcott
in thread POD for use feature 'declared_refs' wrong by LanX

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-18 13:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found