Memoize::Lift

Lift expression evaluation to compile time
Download

Memoize::Lift Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Andrew Main
  • Publisher web site:
  • http://search.cpan.org/~zefram/

Memoize::Lift Tags


Memoize::Lift Description

Lift expression evaluation to compile time Memoize::Lift is a Perl module that supplies an operator that causes an expression to be evaluated immediately at compile time, memoising its value for use at runtime.OPERATORSlift(EXPR)- Evaluate EXPR at compile time and memoise its value. Whenever a lift expression is evaluated at runtime, it yields the value that EXPR yielded at compile time. There is one instance of this memoisation for each instance of the lift operator in the source.- EXPR is lexically located where the lift operator is, and can use static aspects of the lexical environment normally. However, because EXPR is evaluated at compile time, it cannot use any aspects of the dynamic environment as it would exist at runtime of the lift operator. Lexical variables visible at the location of the lift operator remain visible to EXPR, but referencing them is an error.- If evaluation of EXPR results in an exception, that exception will terminate compilation.- EXPR is always evaluated in scalar context, regardless of the context in which the lift operator appears. To memoise a list, write @{lift()}. Requirements: · Perl


Memoize::Lift Related Software