autouse

Pragma for postponing the loading of a module from compile time to execution time. The module isn’t loaded until one of its subroutines is used; the subroutines all have to be exported by the module:

use autouse module => qw(sub1 [sub2 ...])

Use with care, since problems that might otherwise be found during compilation won’t crop up until your program is already executing.

Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.