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

Hello. I am trying to use pp to package a script that makes use of Image::ExifTool. I'm using ActivePerl on Win32.
When I just try to run pp ie (pp -o PicasaTest.exe PicassaNoGui.pl), I get an executable, but when I try to run it, it returns the following error:
"Error while attempting to call Image::ExifTool::SetNewValue Can't locate Image/ExifTool/Writer.pl in @INC (@INC contains: C:\Users +\TOMSMI~1\ AppData\Local\Temp\par-Tom_Smith\cache-1e66579c8cce873c221e2c86b830550 +64fe089d4\ inc\lib C:\Users\TOMSMI~1\AppData\Local\Temp\par-Tom_Smith\cache-1e665 +79c8cce873 c221e2c86b83055064fe089d4\inc CODE(0x1806e9c) CODE(0x180666c)) at (eva +l 19) line 1, <PICASAFILE> line 13."
So, I try to run pp with a command to include the file:
pp -a C:\Perl\site\lib\Image\ExifTool\Writer.pl
Which pp does, according to its output:
"adding C:/Perl/site/lib/Image/ExifTool/Writer.pl as Perl/site/lib/Ima +ge/ExifTool/Writer.pl"
However, when I run the resulting exe, I get the same error as above.
Any ideas? Thanks! Tom

Replies are listed 'Best First'.
Re: Problem with Image::ExifTool and pp
by pileofrogs (Priest) on Jan 29, 2009 at 23:28 UTC

    Hi, since no one has helped you out with a direct answer, I'll subject you to one of my vague proto-answers.

    Have you tried using pp to build a "hello world" app or similar? Make sure you do that. Then, if it still doesn't work, make something progressively more complex until it breaks. Then you'll know what's breaking.

    --Pileofrogs

      Hey, thanks, yeah pp works fine with a basic app.

      I ran some tests with a less complex version of my full script. The full script uses Tk to implement a GUI--when I got rid of the GUI and ran pp on it with the -x option (where it runs the program to check for extra dependencies), the resulting exe worked fine. However, when I added the GUI back in and tried to run it with -x, pp launched the app with the full GUI, but once I had finished running the app and quit out of it, pp just hung at the command line and never created an exe.

      Maybe there's a way to get it to run with -x on the GUI version?

      I should also point out that this is not unique to pp--I'm getting the same error when I use perl2exe.

      Tom
        I don't think you want to specify an absolute path for the included modules. Also, I would use -M. So here is an @-file that should work, assuming the exiftool modules are in a directory called 'lib' when you run pp:

        -o myscript.exe
        -I lib
        -M Image::ExifTool::AFCP
        -M Image::ExifTool::AIFF
        -M Image::ExifTool::APE
        -M Image::ExifTool::APP12
        -M Image::ExifTool::ASF
        -M Image::ExifTool::BMP
        -M Image::ExifTool::BZZ
        -M Image::ExifTool::BigTIFF
        -M Image::ExifTool::BuildTagLookup
        -M Image::ExifTool::Canon
        -M Image::ExifTool::CanonCustom
        -M Image::ExifTool::CanonRaw
        -M Image::ExifTool::CanonVRD
        -M Image::ExifTool::Casio
        -M Image::ExifTool::DICOM
        -M Image::ExifTool::DNG
        -M Image::ExifTool::DjVu
        -M Image::ExifTool::EXE
        -M Image::ExifTool::Exif
        -M Image::ExifTool::Fixup
        -M Image::ExifTool::FLAC
        -M Image::ExifTool::Flash
        -M Image::ExifTool::FlashPix
        -M Image::ExifTool::FotoStation
        -M Image::ExifTool::FujiFilm
        -M Image::ExifTool::GeoTiff
        -M Image::ExifTool::GIF
        -M Image::ExifTool::GPS
        -M Image::ExifTool::HP
        -M Image::ExifTool::HTML
        -M Image::ExifTool::HtmlDump
        -M Image::ExifTool::ICC_Profile
        -M Image::ExifTool::ID3
        -M Image::ExifTool::IPTC
        -M Image::ExifTool::ITC
        -M Image::ExifTool::JPEG
        -M Image::ExifTool::Jpeg2000
        -M Image::ExifTool::JVC
        -M Image::ExifTool::Kodak
        -M Image::ExifTool::KyoceraRaw
        -M Image::ExifTool::Lang::ch_s
        -M Image::ExifTool::Lang::cz
        -M Image::ExifTool::Lang::de
        -M Image::ExifTool::Lang::en_ca
        -M Image::ExifTool::Lang::en_gb
        -M Image::ExifTool::Lang::es
        -M Image::ExifTool::Lang::fr
        -M Image::ExifTool::Lang::it
        -M Image::ExifTool::Lang::jp
        -M Image::ExifTool::Lang::nl
        -M Image::ExifTool::Lang::pl
        -M Image::ExifTool::Leaf
        -M Image::ExifTool::MakerNotes
        -M Image::ExifTool::MIE
        -M Image::ExifTool::MIFF
        -M Image::ExifTool::Minolta
        -M Image::ExifTool::MinoltaRaw
        -M Image::ExifTool::MNG
        -M Image::ExifTool::MPC
        -M Image::ExifTool::MPEG
        -M Image::ExifTool::Nikon
        -M Image::ExifTool::NikonCapture
        -M Image::ExifTool::Olympus
        -M Image::ExifTool::Panasonic
        -M Image::ExifTool::PDF
        -M Image::ExifTool::Pentax
        -M Image::ExifTool::PhotoMechanic
        -M Image::ExifTool::Photoshop
        -M Image::ExifTool::PICT
        -M Image::ExifTool::PNG
        -M Image::ExifTool::PostScript
        -M Image::ExifTool::PPM
        -M Image::ExifTool::PrintIM
        -M Image::ExifTool::QuickTime
        -M Image::ExifTool::Rawzor
        -M Image::ExifTool::Real
        -M Image::ExifTool::Ricoh
        -M Image::ExifTool::RIFF
        -M Image::ExifTool::Sanyo
        -M Image::ExifTool::Shortcuts
        -M Image::ExifTool::Sigma
        -M Image::ExifTool::SigmaRaw
        -M Image::ExifTool::Sony
        -M Image::ExifTool::TagInfoXML
        -M Image::ExifTool::TagLookup
        -M Image::ExifTool::Unknown
        -M Image::ExifTool::Vorbis
        -M Image::ExifTool::XMP
        -M Image::ExifTool::XMP2
        -M Image::ExifTool::ZIP
        -M Image::File::RandomAccess
        -M Image/ExifTool/Shift.pl
        -M Image/ExifTool/WriteCanonRaw.pl
        -M Image/ExifTool/WriteExif.pl
        -M Image/ExifTool/WriteIPTC.pl
        -M Image/ExifTool/WritePDF.pl
        -M Image/ExifTool/WritePhotoshop.pl
        -M Image/ExifTool/WritePNG.pl
        -M Image/ExifTool/WritePostScript.pl
        -M Image/ExifTool/Writer.pl
        -M Image/ExifTool/WriteXMP.pl
        myscript
Re: Problem with Image::ExifTool and pp
by hominid (Priest) on Jan 30, 2009 at 13:31 UTC
    I can't help with pp, but I have had very good luck with Cava.