I've started playing around with PAR, and I've hit a snag when it comes to building and executing standalones on Win32. Specifically - if I've used any non-core modules in the code. I've reduced this to the simplest possible case in order to demonstrate my problem. Please consider the following:
K:\Perl\temp>type bar.pl use Cwd; print "Hello World\n"; K:\Perl\temp>pp -o bar.exe bar.pl K:\Perl\temp>bar.exe Hello World
So far, so good. However....
K:\Perl\temp>type foo.pl use Data::Dumper::Simple; print "Hello World\n"; K:\Perl\temp>foo.pl Hello World K:\Perl\temp>pp -o foo.exe foo.pl
If I then try to run foo.exe, I first get a dialog box with this:
"The procedure entry point PL_memory_wrap could not be located in the +dynamic link library perl58.dll"
and then the following error:
K:\Perl\temp>foo.exe Can't load 'K:\DOCUME~1\Darren\LOCALS~1\Temp\par-Darren\cache-11429565 +20\b007796 b.dll' for module Data::Dumper: load_file:The specified procedure coul +d not be f ound at D:/cpanrun/build/5-8-0/lib/DynaLoader.pm line 229. at ../blib/lib/PAR/Heavy.pm line 107 Compilation failed in require at Data/Dumper/Simple.pm line 6. BEGIN failed--compilation aborted at Data/Dumper/Simple.pm line 6. Compilation failed in require at script/foo.pl line 1. BEGIN failed--compilation aborted at script/foo.pl line 1.
So basically, if I include any non-core modules - it borks. I've tried it with various modules, all with the same result. I'm guessing that perhaps something is screwed wth my libraries or path - but I'm not sure where to start looking.

Can somebody please point me in the right direction?

Update: - removed external (image) link as suggested by davidrw.

Update 2: - problem solved. Many thanks to pboin for the pointer :)

Thanks,
Darren :)


In reply to Problem including non-core modules in a PAR executable (Win32) by McDarren

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.