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

Hi Monks,
I was just wondering if anyone could tell me whether it is possible to build web independent graphical windows applications using Perl? I think I remembering hearing something about Tk? Also, is it possible to make my programs executable, i.e. an *.exe file on a windows system for example. As opposed to needing to type perl myfile.pl?

Thanks,
Tom.

Replies are listed 'Best First'.
Re: Building Applications in Perl
by cjf-II (Monk) on Dec 21, 2002 at 21:18 UTC
Re: Building Applications in Perl
by Marza (Vicar) on Dec 21, 2002 at 21:21 UTC

    Take a scan of the O'Reiley book perl/Tk book. I have not seen it myself so maybe one of the other brothers can give you more detail.

    As to runing an executable. Sure. But what do you hope to gain?

    If you are trying to avoid perl installs. Well you can look at IndigoStar perl2exe

    If you are avoiding some typing, then for windows you can put the path to your perl binary in your environmental path and then create a file association.

    To associate a file extension with a file type Open Folder Options in Control Panel. Click the File Types tab. Click New. Type a new or existing file name extension, and then click Advanced. In File type, click New to create a new file type that is associated w +ith the file name extension. Or, click one of the existing file types +.

    I think all you need is : PL Perl File and PLS PERLSCRIPTFILE

    I don't have my regular computer or my books at the moment

    UPDATE

    Now that I have my book. You need to associate the .PL extenstion: assoc .pl=PerlFile

    Next, Register PerlFile type with the Perl binary by entering: ftype PerlFile=c:\perl\bin\perl.exe "%1" %* Or where ever you installed Perl.

    Finally, add the .PL to the list of executable extensions. For W2K that is PATHEXT. Simpley add: .PL; to the front of the list

    after that you don't need to enter perl file or even the .pl

Re: Building Applications in Perl
by FamousLongAgo (Friar) on Dec 21, 2002 at 22:12 UTC
    You might want to try playing with PerlQT - this is a recent binding to the very nice QT windowing toolkit, and should work across platforms. You can find out more about them on their homepage.

    I have posted install instructions for getting PerlQt working on Mac OS 10.2 - for other platforms, you'll have to look around on the mailing lists and Google.