Tk-perl2exe FileSelect error

M

MoshiachNow

HI,

My following code runs fine with Activestate on Windows:
$FSref = $mw->FileSelect(-directory => "d:\\",-filter => "*.zip");
$filename1 = $FSref->Show;

However fails after perl2exe compilation.
Appreciate any advise.

Tk::Error:
PLEASE SEE THE PERL2EXE USER MANUAL UNDER "Can't locate somemodule.pm
in @INC"
FOR AN EXPLANATION OF THE FOLLOWING MESSAGE:
Can't locate utf8.pm in @INC (@INC contains: PERL2EXE_STORAGE
D:\Documents and Settings\Ad
ministrator\Desktop\test E:\Temp\1/p2xtmp-2568) at
PERL2EXE_STORAGE/Carp/Heavy.pm line 55.

BEGIN failed--compilation aborted.
Tk callback for .fileselect.dir_entry
Tk callback for .fileselect.file_entry
Tk callback for .fileselect.dir_list
Tk callback for .fileselect.dir_list.ysbslice
Tk callback for .fileselect.dir_list.ysbslice.corner
Tk callback for .fileselect.frame
Tk callback for .fileselect.file_list
Tk callback for .fileselect.file_list.ysbslice
Tk callback for .fileselect.file_list.ysbslice.corner
Tk callback for .fileselect.dialog.top
Tk callback for .fileselect.dialog.bottom
Tk::Derived::configure at PERL2EXE_STORAGE/Tk/Derived.pm line 306
Tk::Widget::new at PERL2EXE_STORAGE/Tk/Widget.pm line 205
Tk::Widget::__ANON__ at PERL2EXE_STORAGE/Tk/Widget.pm line 256
Tk::Derived::Component at PERL2EXE_STORAGE/Tk/Derived.pm line 502
Tk::FileSelect::populate at PERL2EXE_STORAGE/Tk/FileSelect.pm line 233
Tk::Derived::InitObject at PERL2EXE_STORAGE/Tk/Derived.pm line 477
Tk::Widget::new at PERL2EXE_STORAGE/Tk/Widget.pm line 203
Tk::Widget::__ANON__ at PERL2EXE_STORAGE/Tk/Widget.pm line 256
main::recov at D:\Documents and
Settings\Administrator\Desktop\test\rehost.exe line 997
Tk callback for .button1
Tk::__ANON__ at PERL2EXE_STORAGE/Tk.pm line 252
Tk::Button::butUp at PERL2EXE_STORAGE/Tk/Button.pm line 111
<ButtonRelease-1>
(command bound to event)
 
S

Sisyphus

MoshiachNow said:
HI,

My following code runs fine with Activestate on Windows:
$FSref = $mw->FileSelect(-directory => "d:\\",-filter => "*.zip");
$filename1 = $FSref->Show;

However fails after perl2exe compilation.
Appreciate any advise.

Tk::Error:
PLEASE SEE THE PERL2EXE USER MANUAL UNDER "Can't locate somemodule.pm
in @INC"
FOR AN EXPLANATION OF THE FOLLOWING MESSAGE:

Did you consult the manual for an explanation ? I don't have perl2exe so I
can't tell whether the info contained therein is useful or not - but I
suspect it might be of some assistance :)
Can't locate utf8.pm in @INC
..
..

Is there some switch that will enable the loading of utf8.pm ?

PAR's pp utility sometimes suffers a similar problem with the loading of
modules - but it enables the loading of specific modules by using the '-M'
switch in the command line (which usually fixes the problem) - in this case
it would be something like:

pp -M utf8 -o script.exe script.pl

Alternatively, you might find that if your script explicitly uses utf8, then
the problem disappears.

Cheers,
Rob
 
M

MoshiachNow

Did you consult the manual for an explanation ? I don't have perl2exe so I
can't tell whether the info contained therein is useful or not - but I
suspect it might be of some assistance :)

Is there some switch that will enable the loading of utf8.pm ?

Did consult the manual,nothing that they suggested helped.

Alternatively, you might find that if your script explicitly uses utf8, then
the problem disappears.

My script does not explicitely use utf8.pm...
Thanks
 
S

Sisyphus

..
..
My script does not explicitely use utf8.pm..

But maybe if it did, then the problem would disappear - ie, in your script:

use utf8;

(I don't know whether that will help, but it's not hard to find out :)

Cheers,
Rob
 
M

MoshiachNow

But maybe if it did, then the problem would disappear - ie, in your script:

use utf8;


"use utf8" did not work,but "require utf8" did work.
Thanks

P.S. why does this strange module give so much trouble ?I saw it
already 20 times or more ,using different modules...
 
B

Ben Morrow

Quoth "MoshiachNow said:
"use utf8" did not work,but "require utf8" did work.
Thanks

P.S. why does this strange module give so much trouble ?I saw it
already 20 times or more ,using different modules...

It's part of Perl's internal utf8 implementation. There are lots of
places in perl's guts where perl implicitly does a 'require utf8;' as
part of something else; IMHO perl2exe should know this and always
include it, but there y'go... :)

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top