demerphq wrote:
>But it would be nice if there was an easy way to tell Perl and Module
>code to preload everything and forget lazy loading.
use less "laziness";
If we standardise on this less.pm keyword meaning that, then any module
can participate in observing it. A module's ->import method would want
to look for the less-laziness flag in its caller's hint hash.
Unfortunately, the less->of method doesn't actually look there: it
only looks at its immediate caller's hint hash. less->of("laziness")
will actually only return true when called within the lexical scope of
'use less "laziness";'. We need a better interface for querying it.
Then we can actually make less.pm useful.
-zefram
Thread Previous
|
Thread Next