develooper Front page | perl.perl5.porters | Postings from November 2021

Re: A 'permanent' keyword

Thread Previous | Thread Next
From:
David Nicol
Date:
November 11, 2021 16:52
Subject:
Re: A 'permanent' keyword
Message ID:
CAFwScO_8pEF3+UNkvJC7q+o2sj+9q4MdT9Kyq6BgXY=KvHWCHA@mail.gmail.com
another imaginary way to do this (all of these things, state, permament,
etc) is with the non-existent ONCE keyword that executes its block once,
essentially prefixing it with

         $unique_package_scoped++ and return;

except the effect would optimzed the block out instead of turning it into a
no-op.


-- 
"Lay off that whiskey, and let that cocaine be!" -- Johnny Cash

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About