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

Hi All,

I have written a perl script with gui in Tk. perl script works perfectly, when I run it as a perl script. But if I make it exe either by perlapp or pp both of them throw the same error as follows

Can't locate Tk/Labelframe.pm in @INC (@INC contains: C:\DOCUME~1\007TEC~1.000\LOCALS~1\Temp\par-007\cache-9480c3426da6e54ae021969fca4283013a6ee71e\inc\lib C:\DOCUME~1\007TEC~1.000\LOCALS~1\Temp\par-007\cache-9480c3426da6e54ae021969fca42830 13a6ee71e\inc CODE(0x117e1cc) CODE(0x117dc9c)) at Tk/Widget.pm line 270.

I have used following modules in my script

use Tk; use Tk::ROText; use Win32; use Win32::FileOp; use File::Find; use Tk::LabFrame; use Tk::LabEntry;

can anybody help us to solve this problem?

Thanks in Advance

Srikrishnan R

Replies are listed 'Best First'.
Re: labelframe and gui
by Old_Gray_Bear (Bishop) on Feb 10, 2011 at 10:07 UTC
    You don't show me line 270, so I am guessing here; but I suspect that it reads some thing like:
    my $label_frame = Tk::Lableframe::new();
    There are two bits here:
    • The name of the package is Tk::LabelFrame (emphasis added)
    • Your use statement is for Tk::LabFrame; both modules exist in CPAN.

    Update: fixed typo, thanks SuicideJunkie.

    ----
    I Go Back to Sleep, Now.

    OGB

Re: labelframe and gui
by marto (Cardinal) on Feb 10, 2011 at 10:08 UTC

    Have you tried explicitly adding Tk::Labelframe when packaging, e.g.:

    pp -M Tk::Labelframe -o MyApp MyApp.pl
Re: labelframe and gui
by lamprecht (Friar) on Feb 10, 2011 at 12:49 UTC

    If your Labelframe is instantiated like so: $parent->Labelframe it should get picked up by pp. Otherwise adding use Tk::Labelframe to your program will solve your problem.

    Cheers, Christoph