AutoSplit

Splits a program or module into files that the AutoLoader can handle. It can be called from a program or from the command line:

# From a program
use AutoSplit;
autosplit_modules(@ARGV)

# From the command line
perl -MAutoSplit -e 'autosplit(FILE, DIR, KEEP, CHECK, MODTIME)' ... 

# Another interface
perl -MAutoSplit -e 'autosplit_lib_modules(@ARGV)' ...

AutoSplit is used by MakeMaker as well as by the standard Perl libraries. It operates on a file, splitting off subroutines that come after the _ _END_ _ marker and storing them as described above for AutoLoader, creating any necessary directories along the way. AutoSplit has two functions.

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.