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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|