in reply to stronger than eval?

you can do this with UNIVERSAL::require
use UNIVERSAL::require; unless ( "Cache::File"->use ) { print "error: $@"; }

Replies are listed 'Best First'.
Re^2: stronger than eval?
by diotalevi (Canon) on Sep 21, 2006 at 19:18 UTC

    do this with UNIVERSAL::require
    which no one should ever do. It pollutes the UNIVERSAL class which means it affects every class and every object.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

      i agree with the second sentence, but not the first. ;-)

        So having unrelated objects all get a method that they might not wish to have added to them is ok with you?

        ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊