Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Problem with getSaveFile in 'pp'-mode

by jowe (Sexton)
on Mar 09, 2013 at 16:50 UTC ( #1022592=perlquestion: print w/replies, xml ) Need Help??
jowe has asked for the wisdom of the Perl Monks concerning the following question:

Hi PerlMonks,
running this little script in 'non-pp'-mode works fine. 'pp'-mode does'nt like it. I am sure, some modules have to be included - but I can't figure out which ones.
Would somebody be so kind to point me in the right direction. Thanks in advance!

Linux Mint 14 using Perl v5.14.2
=========== ==================================== +========= #!/usr/bin/perl use Tk; $mw = MainWindow->new(-title => 'sample_getSaveFile'); my $DOC_filetypes = [['Text', '.txt'], ['Any File', '.*']]; my $i = $mw->getSaveFile(-defaultextension => '.myown', -filetypes => $DOC_filetypes, -initialdir => '.', -initialfile => 'xyz', -title => 'getSaveFile'); if (defined $i) { print 'Successful getSaveFile'; } else { print 'Error on getSaveFile'; } MainLoop; =========== PAR Packager, version 1.012 (PAR version 1.005) ========== +============== pp -C --vvv -L pp_logifle.txt -o sample_getSaveFile sample_getSaveFile =========== running sample_getSaveFile =============================== +============== Can't locate Tk/ in @INC (@INC contains: CODE(0x8c40cfc) CODE +(0x8c410bc)) at Tk/ line 270. at Tk/ line 203 =========== after including 'use Tk::Bitmap;', running 'pp' and execut +ing 'sample_getSaveFile' the following message appears: ======== XS_Tk__Callback_Call error:must specify one of -data, -file, -array or + -id at Tk/ line 21. Tk::Error: must specify one of -data, -file, -array or -id at Tk/Image line 21. Tk callback for image Tk::Image::new at Tk/ line 21 Tk::Image::__ANON__ at Tk/ line 63 Tk::FBox::Update at Tk/ line 404 Tk::After::once at Tk/ line 90 [once,[{},after#13,idle,once,[{},Update]]] ("after" script) ====================================================================== +=================

Replies are listed 'Best First'.
Re: Problem with getSaveFile in 'pp'-mode
by marto (Bishop) on Mar 09, 2013 at 17:42 UTC

    Like your previous post, you're going to have to tell us what doesn't work. How do I post a question effectively?.

    update: ignore.the above. Can you you used pp to build this? Did you use the -x flag?

      I tried to describe the problem in 4 steps:
      1. line 3-33 is the script. When executing as 'perl' it works fine.
      2. line 37: using PAR::Packer to package the very same script (from step 1) into a binary executable.
      3. line 41-42: Executing the generated binary executable from step 2 show error messages
      4. line 46-55: after including 'use Tk::Bitmap' into the script (line 3-33) and running the PAR::Packer again (step 2) the executable shows different error messages.

      My question: "what am I doing wrong or what modules have to be included to satisfy PAR::Packer?"
      see line 37 please.

        Sorry, not my day. You want to call pp with -x. See the pp documentation. Note that this is lowercase rather than uppercase x. Go ahead and add -x to your pp arguments and test the resulting executable

Re: Problem with getSaveFile in 'pp'-mode
by ww (Archbishop) on Mar 09, 2013 at 17:11 UTC
    Ln 41, 42 ?

    If you didn't program your executable by toggling in binary, it wasn't really programming!

      How do I have to interpret 'Ln 41-42'?
        One plausible interpretation?

        Read the error msg shown at Lines 41 - 42 in your original post.

        If you didn't program your executable by toggling in binary, it wasn't really programming!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1022592]
Approved by marto
and the pool shimmers...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2017-08-17 00:51 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (277 votes). Check out past polls.