in reply to Perl/Tk and PAR::Packer on OS X
G'day elef,
"... they may require some other software or installing a different version of perl instead of using the preinstalled version."
Firstly, don't modify the Mac OS X System Perl in any way. Apple installs its own version of Perl for its own use. Any changes you make can interfere with how this works; any updates to the Mac can interfere with whatever you've done.
I started using a Mac a couple of years ago and asked "Are there any major Perl issues with Mac OS X Lion?". That may be a little dated now and you could be working on a different version; however, I believe the basic information is still sound. I chose the perlbrew option: it's worked without problems with many versions of Perl. See App::perlbrew for installation and perlbrew for command details.
"The big question is whether the same thing can be done on OS X."
I'm using Perl v5.18.1 and have Tk v804.031 installed (the latest versions in both cases). I just installed PAR::Packer v1.015 without incident.
I wrote this short test script (pm_test_pp_tk.pl) and tested it successfully:
#!/usr/bin/env perl use strict; use warnings; use Tk; my $mw = MainWindow->new; my $frame = $mw->Frame->pack; $frame->Label(-text => 'Hello, world!')->pack; $frame->Button(-text => 'Quit', -command => sub { exit })->pack; MainLoop;
I then used pp:
$ pp -o pm_test_pp_tk.exe pm_test_pp_tk.pl
I successfully tested pm_test_pp_tk.exe.
You may already be aware that there's a substantial difference in the sizes of those files:
$ ls -l pm_test_pp_tk.* -rwxr-xr-x 1 ken staff 6893413 22 Nov 12:13 pm_test_pp_tk.exe -rwxr-xr-x 1 ken staff 238 22 Nov 12:10 pm_test_pp_tk.pl
I leave testing with DBI, and any other modules you might need, as an exercise for your good self.
-- Ken
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Perl/Tk and PAR::Packer on OS X
by elef (Friar) on Nov 22, 2013 at 11:56 UTC | |
by kcott (Archbishop) on Nov 22, 2013 at 22:36 UTC | |
by elef (Friar) on Nov 24, 2013 at 14:12 UTC | |
by kcott (Archbishop) on Nov 25, 2013 at 04:45 UTC | |
by elef (Friar) on Nov 25, 2013 at 11:16 UTC | |
| |
by Anonymous Monk on Nov 24, 2013 at 23:10 UTC | |
by elef (Friar) on Nov 25, 2013 at 10:26 UTC |