Hi all,
I just wanted to create the par package, where I could have the
filtered version of my script with a filtered versions of my own
libraries (perl *.pm files) which this script uses. I try to do it,
but every time "pp" creates an executable which contain all modules
filtered, which causes the execution error like this one:
Functions.pm did not return a true value at (eval 11) line 5.
BEGIN failed--compilation aborted at (eval 11) line 5.
I try to recompile a small test script like the one below:
# ---- c.pl ----
#!/bin/env perl
use warnings;
use strict;
use Functions;
print "Interpreter: $^X\n";
print "This is a script 'c'(1)\n";
my $path = print_path(@ARGV);
system("b");
print "This is a script 'c'(2)\n";
print "press key..."; <STDIN>;
which uses the "Functions.pm" module:
# ---- Functions.pm ----
package Functions;
BEGIN {
use Exporter ();
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
$VERSION = 1.00;
@ISA = qw(Exporter);
@EXPORT = qw(&print_path);
}
sub print_path {
my $param = @_;
print "PATH:\n" if defined $param;
my @path = split(':', $ENV{'PATH'});
foreach my $dir (@path) {
print "\t$dir\n" if defined $param;
}
my $tmp_dir = $path[0] . "/inc/script";
return $tmp_dir;
}
1;
and I compiled this script using such command:
pp -vvv -C -B -f Bleach -F Bleach -B -o ../c c.pl
but this introduces this problem. But if I will compile like this:
pp -vvv -C -B -f Bleach -B -o ../c c.pl
then the script is executing without a problems, but the code of the
Functions.pm file is visible, which is not what I wanted to have.
I there a way to hide this code?
Regards,
Murphy
--
__ __
|| ||
-++- -++- --------------------------------------------------------
||\ /|| e-mail: [EMAIL PROTECTED] GG 107745
|| || Everything is possible - this is only a question of time
\/564\/ --------------------------------------------------------