http://qs321.pair.com?node_id=1205604

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks

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.

use Lingua::Sentence; my $splitter = Lingua::Sentence->new("en"); my $text = 'This is a paragraph. It contains several sentences +. "But why," you ask?'; print $splitter->split($text);

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.