Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

comment on

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


#!/usr/bin/perl use strict; use warnings; use v5.36; say 'Hello, world!';

In 5.38, we see:

DB<1> use Devel::Peek; DB<2> Dump( ${"_<"}[8] ); SV = PVMG(0x55d8627958e0) at 0x55d86251ff80 REFCNT = 1 FLAGS = (IOK,POK,IsCOW,pIOK,pPOK) IV = 94387850872920 NV = 0 PV = 0x55d8628074b0 "say 'Hello, world!';\n"\0 CUR = 21 LEN = 32 COW_REFCNT = 1 DB<3> Dump( ${"_<"}[6] ); SV = PVMG(0x55d862786d50) at 0x55d86251fec0 REFCNT = 1 FLAGS = (POK,pIOK,pNOK,pPOK) IV = 0 NV = 0 PV = 0x55d8627d7d50 "use v5.36;\n"\0 CUR = 11 LEN = 16

See how "line 8" has IOK and POK, but "line 6" only has POK? That means that line 8 contains an integer in addition to the string, while line 6 contains only the string. This doesn't match the documentation.

(As a side note, why 94387850872920? In hex, it's 55D862528858, which in the same range as the addresses being dumped. So it looks like it's not just a flag, but a pointer to something.)

Note that the problem is limited to lines containing pragmas. The non-pragma unbreakable lines have IOK and a value of zero.

DB<4> use Devel::Peek;Dump( ${"_<"}[5] ); SV = PVMG(0x55856a4198d0) at 0x55856a4e9630 REFCNT = 1 FLAGS = (IOK,POK,pIOK,pPOK) IV = 0 NV = 0 PV = 0x55856a486840 "\n"\0 CUR = 1 LEN = 16

So only the lines with pragmas are broken. But this wasn't always the case. They used to be broken in a different way. Here with 5.34, we see that pragmas were once breakable.

DB<2> Dump( ${"_<"}[6] ); SV = PVMG(0x55874ddaf680) at 0x55874db508a8 REFCNT = 1 FLAGS = (IOK,POK,pIOK,pPOK) IV = 94039612799016 NV = 0 PV = 0x55874db739a0 "use v5.10;\n"\0 CUR = 11 LEN = 16

I'm guessing that when they fixed the bug marking pragmas as breakable, they forgot to set the IOK flag.

Bug report

In reply to Re: Perl 5.36 warns for magic comparison by ikegami
in thread Perl 5.36 warns for magic comparison by hurricup

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?

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-04-24 10:02 GMT
Find Nodes?
    Voting Booth?

    No recent polls found