in reply to using a variable with require

TIMTOWTDI:
require UNIVERSAL::require; $name = 'SomeModule'; $name->require; $name->somesub();

Replies are listed 'Best First'.
Re^2: using a variable with require
by haukex (Archbishop) on Jan 24, 2023 at 10:24 UTC
    UNIVERSAL::require

    I would not recommend this. It adds two methods to the UNIVERSAL class, the base class for all Perl classes. This means that loading this module can affect every single class and object in the program.