Using

#!/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( ${"_<a.pl"}[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( ${"_<a.pl"}[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( ${"_<a.pl"}[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( ${"_<a.pl"}[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

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.