Hi! I can take the blame for some of Readonly and all of ReadonlyX!

So, I inherited Readonly to fix a bug that was breaking a dependency 2 or 3 levels up from what I was working on at the time. From what I remember (way back in 2013 or 2014), it was flat out crashing on what was then bleadperl and became 5.20.x. p5p was refactoring magic around tied variables and some undocumented behavior Readonly had been taking advantage of since at least 2002 was finally being fixed in perl itself.

The showstopper I needed fixed didn't change how Readonly behaved but there are still several major bugs that cannot be fixed without harming people. I groan whenever I see Readonly as a dependency to this day because it is so fundamentally broken. I made the most used of Readonly's 3 different APIs almost 50 times (not 50%) faster according to benchmarks without an issue but the guy who talked me into wasting months on deeply, CLONE-able, tie-based immutable vars that'll never work properly better avoid dark alleys. :) If it works for you, great. I don't suggest using Readonly for new code though.

ReadonlyX was just a gist on github until someone asked for it to be uploaded to CPAN and I pushed it as a dist in the middle of the night without much of a plan, updated some of the docs a day or so later, and never even created a repo for it. It was never really meant to be a true drop in replacement for Readonly despite that hasty claim because I consider Readonly broken by design (not the fault of the original author; even brilliant code will become unwieldy and begin to smell after 20 years). ReadonlyX uses perl's internal, fast magic to mark an SV * as immutable, borrowed the least broken of Readonly's 3 different APIs, and maintains predictable behavior over different versions of perl which Readonly cannot promise without breaking darkpan. It never should have been given the name ReadonlyX but, well, it's out there now.

In reply to Re^2: Readonly vs ReadonlyX by SankoR
in thread Readonly vs ReadonlyX by rlauer

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.