For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > September 2006 > Tk-perl2exe FileSelect error









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Tk-perl2exe FileSelect error
MoshiachNow

2006-09-25, 3:59 am

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\reho
st.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)

Sisyphus

2006-09-25, 8:00 am


"MoshiachNow" <lev.weissman@creo.com> wrote in message
news:1159171845.811511.98440@d34g2000cwd.googlegroups.com...
> 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


MoshiachNow

2006-09-25, 8:00 am

> 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

Sisyphus

2006-09-25, 8:00 am


"MoshiachNow" <lev.weissman@creo.com> wrote in message
..
..
>
> 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


MoshiachNow

2006-09-25, 8:00 am


> 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...

Ben Morrow

2006-09-26, 6:59 pm


Quoth "MoshiachNow" <lev.weissman@creo.com>:
>
>
> "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

--
I must not fear. Fear is the mind-killer. I will face my fear and
I will let it pass through me. When the fear is gone there will be
nothing. Only I will remain.
benmorrow@tiscali.co.uk Frank Herbert, 'Dune'
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com