develooper Front page | perl.perl6.language | Postings from January 2004

run-once code

Thread Next
David Storrs
January 13, 2004 20:37
run-once code
Message ID:
Given this code:
    if ( some_expensive_lookup_function() >= $MAX_RECORDS ) {

After I enter that block once, I never want to evaluate the condition
again--I want the code to completely disappear from the bytecode (or,
at least, be jumped around).  How would I do that in Perl 6?

(I recall seeing something about how to make assertions drop out, but
I want to be able to do this at run-time, not compile-time.)


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About