in reply to Re^2: How can I catch a failure of use?
in thread How can I catch a failure of use?

Hi,

you just have to mimic what Perl does itself:

perl -le "BEGIN { require Devel::Peek; Devel::Peek->import('Dump') } D +ump 2"

Regards
McA

Replies are listed 'Best First'.
Re^4: How can I catch a failure of use?
by syphilis (Archbishop) on Oct 15, 2014 at 00:20 UTC
    you just have to mimic what Perl does itself

    Yes, I think this is the solution that the OP needs.

    However, it's not really relevant to my question about *runtime* loading as anything that happens in a BEGIN{} block happens at *compile-time*.
    (I'm thinking it's not possible to avoid the parentheses if a module is loaded at runtime.)

    Cheers,
    Rob