in reply to How to split main package into multiple files
Split them out of the file below, uncomment the use lines. The modules run in the order that they are 'use'd in and then test.pl runs.
Probably best to only have global scope code run from one of the files, but ymmv.
--kordaff
#!/usr/bin/perl use warnings; use strict; print "This is test.pl\n"; # use main_1; # use main_2; # use main_3; ########## main_1.pm ############################# package main::; print "this is main_1\n"; ################################################## ########## main_2.pm ############################# package main::; print "this is main_2\n"; ################################################## ########## main_3.pm ############################# package main::; print "this is main_3\n"; ##################################################
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to split main package over multiple files
by mmk (Initiate) on Jun 23, 2016 at 20:35 UTC |