On Wed, Dec 17, 2003 at 06:20:22AM -0000, Rafael Garcia-Suarez wrote: : Larry Wall wrote in perl.perl6.language : : > On Wed, Dec 17, 2003 at 12:11:59AM +0000, Piers Cawley wrote: : >: When you say CHECK time, do you mean there'll be a CHECK phase for : >: code that gets required at run time? : > : > Dunno about that. When I say CHECK time I'm primarily referring : > to the end of the main compilation. Perl 5 appears to ignore CHECK : > blocks declared at run time, so in the absence of other considerations : > I suspect Perl 6 might do the same. : : This has proven to be inconvenient except for a few specialized usages, : such as the B::/O compiler framework. : : There's a need (more or less) for special blocks that can be run at the : end of the compilation phase of any arbitrary compilation unit.
Well, if you want to run at the end of the current compilation unit, a BEGIN block at the end is close to what you want. Admittedly, the BEGIN block can't easily *know* that it's the last thing... That's not to say we can't improve the semantics of CHECK and INIT. Larry