Jocqui has asked for the wisdom of the Perl Monks concerning the following question:
I have a large perl project that i have split up into one main .pl file and multiple .pm files that are being referenced by the main .pl file . I wish to package everything into one file .I used to use "Perl Packager " so that i can have only one executable to send to multiple machines. However pp doesnt locate the .pm files and only packages the pl and other installed perl modules it references . Is there another method of providing this functionality?
Here is an example of the code i am using in the start.pl
#!/usr/bin/perl use strict; use warnings; use Time::HiRes qw(usleep); require moduleA; require moduleB; &moduleA::functionA(); &moduleB::functionA(); &moduleB::functionB(); __END__
and the perl moduleA
package moduleA; use strict; use warnings; require Expect; require Time::HiRes; require moduleB; use Time::HiRes qw(usleep); sub functionA() { my variableA ="&moduleB::functionB"; .............. ................ return someihng; }
When using pp pp start.pl -I ModuleA.pm ModuleB.pm -o start
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: packaging perl
by dasgar (Priest) on Jun 19, 2014 at 13:38 UTC | |
by Jocqui (Novice) on Jun 19, 2014 at 13:42 UTC | |
by Jocqui (Novice) on Jun 19, 2014 at 20:12 UTC | |
by jeffa (Bishop) on Jun 19, 2014 at 21:13 UTC | |
by dasgar (Priest) on Jun 19, 2014 at 21:14 UTC | |
by Jocqui (Novice) on Jun 20, 2014 at 06:03 UTC | |
by Anonymous Monk on Jun 20, 2014 at 08:16 UTC | |
|
Re: packaging perl
by Anonymous Monk on Jun 19, 2014 at 10:05 UTC | |
by Jocqui (Novice) on Jun 19, 2014 at 12:36 UTC | |
by Anonymous Monk on Jun 19, 2014 at 22:39 UTC |