Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

perl2exe error

by anu_1 (Acolyte)
on Nov 03, 2010 at 10:45 UTC ( #869201=perlquestion: print w/replies, xml ) Need Help??

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

I am getting following error when trying to execute this exe

Can't locate in @INC (@INC contains: PERL2EXE_STORAGE/tmp  /xyz/lib/site_perl/5.8.0/sun4-solaris xyz/lib/site_perl/5.8.0 /usr/local/lib/perl5/site_perl .) at /test/sun.exe line 20

I am not using "utf8" inside the code and "" is present in the path in @INC.

Thanks for your help

Replies are listed 'Best First'.
Re: perl2exe error
by sundialsvc4 (Abbot) on Nov 03, 2010 at 12:36 UTC

    I do not expect Perl to understand something like PERL2EXE_STORAGE/tmp.   Most likely this is intended to be a reference to a Shell environment-variable, but Perl will probably be looking for a directory, in the current-directory, that is named:   PERL2EXE_STORAGE.   (Undoubtedly, not what you want...)

    The path-names in @INC should be absolute path-names.   Something that you can guarantee will work anywhere, no matter where you are.

    A very handy command to remember is:   perl -V   (Note the capital “V”).   This will give you a complete dump of the search-path, among other things.

    You can also use a handy one-liner, like:   perl -e 'use utf8;'.

    “Wow!   I can do this in my sleep!”

      I think PERL2EXE_STORAGE is perfectly normal. It's what perl2exe uses to access its packaged libs.

Re: perl2exe error
by kcott (Bishop) on Nov 03, 2010 at 11:20 UTC

    You have a relative path in @INC: xyz/lib/site_perl/5.8.0 should probably be /xyz/lib/site_perl/5.8.0 (i.e. add a leading slash). Is that where lives?

    If that doesn't solve your problem, please post the code so we can see what's happening at line 20.

    -- Ken

Re: perl2exe error
by Anonymous Monk on Nov 03, 2010 at 13:25 UTC
    Have you tried what the manual suggests?

    3. Testing your executable

    Test the executable by running it from a command line prompt.

    If it dies with a "Can't locate in @INC ... " error message, then add an explicit use statement for the missing module to your script.


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://869201]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2022-05-17 06:55 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (65 votes). Check out past polls.