Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Using PerlApp or PAR with modules with data dependenciess

by Marshall (Canon)
on Dec 15, 2017 at 22:17 UTC ( #1205627=note: print w/replies, xml ) Need Help??


in reply to Using PerlApp or PAR with modules with data dependenciess

I am not completely sure in this particular case, but with PerlApp, often the answer is to add more "use" statements, like this:
use Lingua; use Lingua::Sentence;
PerlApp uses the "use" statements to decide what to include into the .exe. If this file is part of the base module's manifest, then this will work. Give it a try and let us know what happens. To force a random file into the .exe with PerlApp like perhaps a .gif that your user code needs, it is easiest to start the GUI version (perlapp with no parameters). If memory serves me correctly, there are some obvious options to select a file. However for the program itself, try the above first.

Update: here is a node where a similar suggestion worked: PerlApp and Win32::Unicode The OP's question is a bit different, but close enough that an attempt is warranted.

Replies are listed 'Best First'.
Re^2: Using PerlApp or PAR with modules with data dependenciess
by Anonymous Monk on Dec 16, 2017 at 09:09 UTC

    Thank you for your suggestion. Without adding:

    use Lingua;

    the exe made by PerlApp (standard settings) produces at runtime following error message related to the line of code I pointed to in the OP:

    Failed to find share dir for dist 'Lingua-Sentence' at /<C:\Users\XY\s +plitter.exe>Lingua/Sentence.pm line 24.

    If I add:

    use Lingua;

    PerlApp is not capable of compile the script. Following error message:

    PerlApp is not able to locate Lingua.pm using the current module searc +h path. This module is probably required. If this module is require +d then adjust the module search path on the Main tab so that it can b +e found. Otherwise consider trimming the module in order to hide thi +s error.

    a quick check confirms that there is no Language.pm module in Perl/site/lib/(Language)

      Well, did you use the ActiveState ppm (Perl Package Manager) application to install these modules? I suspect that you don't have a valid ActiveState Perl installation.

      I looked with ppm on my current installation. I think you need to install Lingua-EN-Sentence using ppm. The ActiveState tools do work, but you have to "play by their rules".

        Hello. Yes, everything has been installed imo the right way. Module Lingua::Sentence has been installed with ActiveState ppm (and it works fine if I run my script). PS: I am not using Lingua::EN::Sentence (this module - relying on no external files can be paked without problems by PerlApp!). PerlApps works for me too, but the exeption is - as I said - when a module relies on external files (in the case of Lingua::Sentence these files are non breaking rules the module needs to perform its task).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1205627]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2020-09-29 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (146 votes). Check out past polls.

    Notices?