Your '/System/Library/...' paths indicate that you're using Mac OS X.
With this sort of question it's useful to specify the OS, its version,
and the Perl version you're using (along with the versions of any relevant modules).
I'm using Mac OS X 10.12.3 (Sierra) and Perl 5.24.0.
The version of Tkx I'm using is 1.09:
the latest version at the time of writing.
The version of pp from 'pp -V':
PAR Packager, version 1.036 (PAR version 1.014) (also the latest version).
"But alas our work computers don't allow folders to be copied to System with out admin login in."
Not "alas" at all, in my opinion; that's actually very sensible.
Don't mess the system Perl (or other system files).
If you install a module that currently doesn't exist,
the installation may upgrade a module that does exist due to a version dependency,
which could break something used by Mac OS X.
If you upgrade Mac OS X, it will likely remove the system Perl,
along with all related files (modules, utilities, etc.),
which will, no doubt, break (some of) your existing Perl programs.
I recommend you use Perlbrew:
I've been using this on many Mac OS X versions (10.6.x to 10.12.3) over the last seven years - it works well.
You have inconsistencies in your post that may have some bearing on your problems:
-
In your description you have "System\Library\Tcl\8.5\TkDND";
in your pp command you're using "/System/Library/Tcl/8.4/..." exclusively.
Note: 8.5 vs. 8.4; and, incorrect backward slashes (\) in the description.
-
In your pp command you have '-M Tk::Text'.
That's a Tk widget, not a Tkx widget.
"... it runs but doesn't display the main window."
I don't understand this.
What exactly do you mean by "the main window"?
Does the GUI not display but some other processing is occurring?
Are you getting log entries, screen messages, or something else to indicate that it's running?
I put together a short script for testing 'pp'.
It's basically the "Hello world" code from the Tkx Synopsis,
plus a text widget (code from http://www.tkdocs.com/tutorial/morewidgets.html#text).
Here's '~/tmp/pm_1182585_tkx_hello.pl' (which runs, without any issues, from the command line):
#!/usr/bin/env perl
use strict;
use warnings;
use Tkx;
my $mw = Tkx::widget->new(".");
$mw->new_button(
-text => "Hello, world",
-command => sub { $mw->g_destroy; },
)->g_pack;
my $text_widget = $mw->new_tk__text(-width => 40, -height => 10);
$text_widget->g_pack;
$text_widget->insert('1.0', 'Test text to test a text widget.');
Tkx::MainLoop();
I tried 'pp' with just the '-o' option.
ken@ganymede: ~/tmp
$ pp -o pm_1182585_tkx_hello pm_1182585_tkx_hello.pl
ken@ganymede: ~/tmp
$ ls -al pm_*
-rwxr-xr-x 1 ken staff 3261537 Feb 23 19:44 pm_1182585_tkx_hello
-rwxr-xr-x 1 ken staff 360 Feb 23 17:27 pm_1182585_tkx_hello.pl
ken@ganymede: ~/tmp
$ pm_1182585_tkx_hello
ken@ganymede: ~/tmp
$
The generated program, 'pm_1182585_tkx_hello', like the original script, 'pm_1182585_tkx_hello.pl',
runs without any problems: it appears correctly; the text is displayed; the button works.
So, the base test shows Mac OS X, 'pp' and 'Tkx' all work together without any special options.
I'd go back and look at the inconsistencies I mentioned; maybe fixing those might help.
I strongly advise you to stop using the system Perl.
Upgrade 'pp' and 'Tkx' if you don't have the latest versions.
You should also try some minimal tests: can you successfully use 'pp' for a basic "Hello world" GUI?
Repeat my test with the text widget: does that work?
Slowly add elements to the GUI until you find something that fails: it may have nothing to do with 'TkDND'.
Another thing to check is $PATH.
The 'which' command should show both 'perl' and 'pp' in the same 'bin' directory.
If all of that fails, describe exactly what you've tried,
then put together a minimal script, such as I did, using 'TkDND',
and describe how that fails (include verbatim warning and error messages).
|