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?