I have a lot of code that uses Sub::Curried, which implements a "curry" keyword. Since it predates the custom keyword feature added in Perl 5.12, it uses Devel::Declare and Devel::BeginLift. But Devel::BeginLift uses some Perl internals in its XS code and doesn't build with recent versions. I made some changes based on total guesswork and got it to compile, but it doesn't pass its tests. Are there any guides to working with opcodes? As another approach, I also tried starting from scratch with Keyword::Simple, Keyword::Declare, or Keyword::Pluggable. But ::Simple and ::Declare can only implement statement-like keywords, while the "curry" keyword is supposed to be like "sub": it's used as a statement in the case of a named sub, or as an expression for an anonymous sub. Keyword::Pluggable can define expression-like keywords, but it expects any particular keyword to be always expression-like or always statement-like. It can't handle one keyword used both ways. Are there other modules that can define keywords with this flexibility?

In reply to updating Devel::BeginLift (or, statement vs. expression keywords) by prj

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.