in reply to Re: BEGIN and compile-time
in thread BEGIN and compile-time

Thanks, that looks nicer. Is there a way of capturing and replaying the original list passed to 'use'?

ah, but...it looks like the top-level use will call import afterwards for us (so we don't need to worry about import...it Just Works with the require). In which case maybe require is more correct, since otherwise we'll call import twice, once when we use it (with no args) and once from the original, script-level use once we finish?

Replies are listed 'Best First'.
Re^3: BEGIN and compile-time
by Anonymous Monk on Nov 02, 2006 at 12:53 UTC
    If you want to use a use without import to be called, just put some parens after the module (and nothing inside the parens):
    use ModX ();