I am trying to pack into an executable (exe) a simple perl script containing a module with data dependencies. I am failing. I am working with ActiveState/PerlApp, but I would like to be able to solve the problem even with Strawberryperl/PAR-PP. I am simply trying to pack the following script with one module.
my $splitter = Lingua::Sentence->new("en");
my $text = 'This is a paragraph. It contains several sentences
+. "But why," you ask?';
The problem has to do imho with this line
# Try loading nonbreaking prefix file specified in constructor
my $dir = dist_dir('Lingua-Sentence');
Once generated the exe there is no more dist_dir, I guess (?). Of course I can twik this line of the module code (for example setting a $dir of my choice (and give my client both exe and the files upon which the module depends), but I do not thing this is the right way to do it. What do you think? PS: this applies to all other modules using some sort of data/files in their module folder.