in reply to Re^11: Why does each() always re-evaluate its argument? ("for_list" )
in thread Why does each() always re-evaluate its argument?

Yeah. I touched on this in my first post. The only thing Perl lacks is the syntactical sugar to make it nice ...which could probably also be added by a module (but it would be a lot more solid if built in).

using the iterator would involve an XS function call

No, that can be optimized away. See Syntax::Feature::Loop and Syntax::Feature::QwComments. Specifically this. (I think were broken by 5.38, but I intend to fix soon.)

  • Comment on Re^12: Why does each() always re-evaluate its argument? ("for_list" )

Replies are listed 'Best First'.
Re^13: Why does each() always re-evaluate its argument? ("for_list" )
by NERDVANA (Priest) on Dec 09, 2023 at 21:21 UTC
    It appears Devel::CallParser was broken in 5.37, so that'd be the first place to look. Interesting module...