/usr/bin/tkpp is in libpar-packer-perl 1.012-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 | #!/usr/bin/perl
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
our $VERSION = '1.11';
=head1 NAME
tkpp - frontend to pp written in Perl/Tk
=head1 SYNOPSIS
B<tkpp>
=head1 DESCRIPTION
Tkpp is a GUI frontend to L<pp>, which can turn perl scripts into stand-alone
PAR files, perl scripts or executables.
Below is a short explanation of all available screen elements; it is also
displayed from the C<Help> - C<Help Contents> menu item.
=head2 Source file
The file you want to pack.
=head2 Output file (--output, --par, --perlscript)
The file you want the source file packed as. This option recognizes the
C<.par>, C<.pl> and executable extensions, and supplies the corresponding build
option automatically.
=head2 Use icon (--icon)
The icon file you want your output file to use. This option will only work
when building Microsoft Windows C<.exe> files. Currently, this option only
accepts C<.ico> files.
=head2 Add modules/files (--add)
Add the specified items into the package, along with their dependencies.
Multiple items should be separated by a comma (C<,>) or semicolon (C<;>).
=head2 Exclude modules (--exclude)
Exclude the given module from the dependency search path and from
the package. Multiple modules should be separated by a comma (C<,>) or
semicolon (C<;>).
=head2 Scan dependencies (--compile, --execute, --noscan)
Specify the dependency scanning method to use. See L<pp> for explanations
of the options.
=head2 GUI (--gui)
Build an executable that does not have a console window. This option is
only applicable on Microsoft Windows, and is ignored when the output file
is a C<.par> file.
=head2 Log (--log)
Log the output of packaging to a file. The log file, F<tkpp.log>, will
be written in the user's home directory.
=head2 Verbose (--verbose)
Increase verbosity of output; from 1 to 3, 3 being the most verbose.
This option is ignored if logging is not enabled.
=head2 Build
Starts building the package.
=head2 File Menu->Preferences
Specify the location to F<perl> and F<pp>. They must be set before Tkpp
will build anything. The Tkpp configuration file, F<.tkpprc>, is
stored in the user's home directory.
=head1 NOTES
I write code for a living not literature, so any misspelled words in any
comments or anything, whoops ;)
=cut
###################################################
# use modules
###################################################
use strict;
use warnings;
use Config;
use FindBin;
use File::Spec;
use File::Basename;
use Tk;
use Tk::Balloon;
use Tk::Dialog;
use Tk::LabEntry;
###################################################
# global variables
###################################################
my $homedir = $ENV{USERPROFILE} || $ENV{HOME};
my $addmodules;
my $configfile = File::Spec->catfile($homedir, ".tkpprc");
my $dogui;
my $dolog;
my $doverbose;
my $excludemodules;
my $scanmethod;
my $gpgpath;
my $iconfile;
my $logfile = File::Spec->catfile($homedir, "tkpp.log");
my $outputfile;
my $perlfile = $^X;
my $perlpath;
my $pppath;
my $sourcefile;
my $statusbar;
my $verboselevel;
my $verboselevelbox;
my $version = "1.1";
my $ppfile = ($^O eq 'MSWin32') ? "pp.bat" : "pp";
my @win32_only = ($^O eq 'MSWin32') ? () : (-state => 'disabled');
###################################################
# declare subroutines
###################################################
sub build;
sub checkconfig;
sub editpreferences;
sub help;
sub myicon;
sub openfile;
sub savefile;
sub showdialog;
sub splashimage;
$| = 1;
# begin building the gui
#
my $main = MainWindow->new();
my $iconimage = &myicon(1);
$main->title("Tkpp");
# make the menu bar
#
$main->configure(-menu => my $menu_bar = $main->Menu);
my $file_mb = $menu_bar->cascade(
-label => "~File",
-tearoff => 0
);
my $help_mb = $menu_bar->cascade(
-label => "~Help",
-tearoff => 0,
);
$file_mb->command(
-label => "~Preferences",
-command => \&editpreferences
);
$file_mb->command(
-label => "E~xit",
-command => sub { $main->destroy }
);
$help_mb->command(
-label => "~Help Contents",
-command => \&help
);
$help_mb->command(
-label => "~About Tkpp",
-command => [
sub { &showdialog },
"About Tkpp", << ".",
Tkpp was written by Doug Gruber <doug(a)dougthug.com>.
In the event this application breaks, you get both pieces ; )
Tkpp Version: $version
.
"info"
]
);
# the frame from which all frames will come
#
my $bigframe = $main->Frame(-borderwidth => 10);
# make the top frame
#
my $frame = $bigframe->Frame();
$frame->Label(-text => "Source file ")->grid(
( $frame->Entry(
-textvariable => \$sourcefile,
-background => "white",
-width => 30
)
),
( $frame->Button(
-image => $main->Getimage("srcfile"),
-command => [
sub { &openfile },
[ [ "Perl Files", [ ".par", ".pl", ".pm" ] ],
[ "All Files", ["*"] ]
],
\$sourcefile
]
)
),
-padx => 1,
-pady => 2
);
$frame->Label(-text => "Output file ")->grid(
( $frame->Entry(
-textvariable => \$outputfile,
-background => "white",
-width => 30
)
),
( $frame->Button(
-image => $main->Getimage("textfile"),
-command => [
sub { &savefile },
[ [ "Binary Files", ["*$Config{_exe}"] ],
[ "PAR Files", [".par"] ],
[ "All Files", ["*"] ]
],
\$outputfile
]
)
),
-padx => 1,
-pady => 2,
);
$frame->Label(-text => "Use icon ")->grid(
( $frame->Entry(
-textvariable => \$iconfile,
-background => "white",
-width => 30
)
),
( $frame->Button(
-image => $main->Getimage("file"),
-command => [
sub { &openfile }, [ [ "ICO Files", [".ico"] ] ], \$iconfile
]
)
),
-padx => 1,
-pady => 2,
)
if ($^O eq 'MSWin32');
# make the middle frame with the module lists
#
my $frame2 = $bigframe->Frame(-borderwidth => 1);
my $frame2balloon = $frame2->Balloon();
$frame2->Label(-text => "Add modules ")->grid(
my $addmoduleentry = $frame2->Entry(
-textvariable => \$addmodules,
-background => "white",
-width => 30
),
-padx => 1,
-pady => 2
);
$frame2->Label(-text => "Exclude modules ")->grid(
my $excludemoduleentry = $frame2->Entry(
-textvariable => \$excludemodules,
-background => "white",
-width => 30
),
-padx => 1,
-pady => 2
);
$frame2->Label(-text => "Scan dependencies ")->grid(
my $scanmethodbox = $frame2->Optionmenu(
-options => [
['static' => undef],
['compile + static' => ['--compile']],
['execute + static' => ['--execute']],
['compile only' => ['--compile', '--noscan']],
['execute only' => ['--execute', '--noscan']],
],
-variable => \$scanmethod,
),
-padx => 1,
-pady => 2
);
$frame2balloon->attach(
$addmoduleentry,
-balloonposition => "mouse",
-balloonmsg =>
"Adds the specified module(s) into the package, along with its dependencies, separate each module with a comma or semicolon"
);
$frame2balloon->attach(
$excludemoduleentry,
-balloonposition => "mouse",
-balloonmsg =>
"Excludes the given module(s) from the dependency search path and from the package, separate each module with a comma or semicolon"
);
# make the middle frame with the checkboxes
#
my $frame3 = $bigframe->Frame(-borderwidth => 5);
my $frame3balloon = $frame3->Balloon();
my $guicheck = $frame3->Checkbutton(
-text => "GUI",
-variable => \$dogui,
-onvalue => "--gui",
-offvalue => "",
@win32_only
)->grid(
( my $logcheck = $frame3->Checkbutton(
-text => "Log",
-variable => \$dolog,
-onvalue => "--log=$logfile",
-offvalue => ""
)
),
( my $verbosecheck = $frame3->Checkbutton(
-text => "Verbose",
-variable => \$doverbose,
-onvalue => "--verbose=",
-offvalue => ""
)
),
( $verboselevelbox = $frame3->Optionmenu(
-options => [ 3, 2, 1 ],
-variable => \$verboselevel,
)
)
);
my $guiballon =
(($^O eq "MSWin32")
? "Build an executable that does not have a console window"
: "This option is only available under Windows");
$frame3balloon->attach(
$guicheck,
-balloonposition => "mouse",
-balloonmsg => $guiballon
);
$frame3balloon->attach(
$logcheck,
-balloonposition => "mouse",
-balloonmsg => "Log the output of packaging to a file"
);
$frame3balloon->attach(
$verbosecheck,
-balloonposition => "mouse",
-balloonmsg =>
"Increase verbosity of output, this option is ignored if logging is not enabled"
);
$frame3balloon->attach(
$verboselevelbox,
-balloonposition => "mouse",
-balloonmsg => "The verbosity level from 1 to 3, 3 being the most verbose"
);
# make the bottom frame
#
my $frame4 = $bigframe->Frame(-borderwidth => 5);
$frame4->Button(
-text => "Build",
-width => 10,
-underline => 0,
-command => \&build
)->grid();
$main->bind("<Alt-b>" => \&build);
$main->bind("<Alt-B>" => \&build);
# make the status bar (for future use)
#
$statusbar = "Ready";
my $statusbottom = $main->Label(
-textvariable => \$statusbar,
-anchor => "w",
-relief => "sunken"
)->pack(
-side => "bottom",
-fill => "x"
);
$frame->pack();
$frame2->pack();
$frame3->pack();
$frame4->pack();
$bigframe->pack();
# create the splashscreen
#
my $splashimage = &splashimage(1);
$main->withdraw();
if (my $splash = eval { require Tk::Splashscreen; $main->Splashscreen }) {
$splash->Label(
-text => "Tkpp",
-font => [ -size => "10", -weight => "bold" ],
-background => "#746b6b"
)->pack(
-fill => "both",
-expand => 1
);
$splash->Label(
-image => $main->Photo("image", -data => $splashimage, -format => "gif"),
-background => "#746b6b"
)->pack();
$splash->Splash(1000);
$splash->Destroy();
}
checkconfig();
$main->iconify();
$main->deiconify();
#$main->raise();
my $icon = $main->Photo(
"image",
-data => $iconimage,
-format => "gif"
);
$main->idletasks;
$main->iconimage($icon);
# align the main window appx with the middle of the screen
#
my $centerwidth = int(($main->screenwidth / 2) - ($main->width / 2));
my $centerheight = int(($main->screenheight / 2) - ($main->height / 2));
$main->geometry("+$centerwidth+$centerheight");
MainLoop;
###################################################
# begin subroutines
###################################################
sub build {
if (!(-e $configfile)) {
showdialog("Preferences not set", << ".", "error");
Your preferences have not been set or your preferences file has been removed.
You will not be able to build your file untill this is complete.
Please go to File -> Preferences to continue.
.
}
elsif (!$pppath) {
showdialog("Path not set", << ".", "error");
The path to $ppfile has not been set.
Please go to File -> Preferences to continue.
.
}
elsif ($perlpath eq "") {
showdialog("Path not set", << ".", "error");
The path to perl$Config{_exe} has not been set.
Please go to File -> Preferences to continue.
.
}
elsif (!(-e $pppath)) {
showdialog("Invalid path", << ".", "error");
The path to $ppfile is invalid.
Check that the file exits and that your path is setup correctly.
Please go to File -> Preferences to change the setting.
.
}
elsif (!(-e $perlpath)) {
showdialog("Invalid path", << ".", "error");
The path to perl$Config{_exe} is invalid.
Check that the file exits and that your path is setup correctly.
Please go to File -> Preferences to change the setting.
.
}
elsif ($sourcefile eq "") {
showdialog("Missing parameter",
"You must specify a source file to build.", "error");
}
elsif ($outputfile eq "") {
showdialog("Missing parameter",
"You must specify an output file to write.", "error");
}
else {
$statusbar = "Building...";
$main->Busy();
my @args = ("$pppath", "--output=$outputfile");
if ($outputfile =~ /\.par$/i) {
push(@args, "--par");
}
elsif ($outputfile =~ /\.pl$/i) {
push(@args, "--perlscript");
}
elsif ($outputfile !~ /\Q$Config{_exe}\E$/i) {
showdialog("Invalid File Format", << ".", "error");
You are trying to write your output file as an invalid file format.
It must be either a $Config{_exe} or .par file.
.
$main->Unbusy();
$statusbar = "Ready";
return ();
}
if ($iconfile) {
push(@args, "--icon=$iconfile");
}
if ($dogui) {
push(@args, $dogui);
}
if ($dolog) {
push(@args, $dolog);
}
if ($doverbose) {
push(@args, "$doverbose$verboselevel");
}
if ($addmodules) {
foreach (split(/,|;/, $addmodules)) {
$_ =~ s/^\s//;
push(@args, "--add=$_");
}
}
if ($excludemodules) {
foreach (split(/,|;/, $excludemodules)) {
$_ =~ s/^\s//;
push(@args, "--exclude=$_");
}
}
if ($scanmethod) {
push @args, @$scanmethod;
}
unlink($logfile);
system($^X, @args, $sourcefile);
if ($dolog) {
open LOGFILE, ">>$logfile";
print LOGFILE "Executed Command: @args\n";
close LOGFILE;
}
$main->Unbusy();
$statusbar = "Ready";
# $statusbar .= "(Error $?: $!)" if $?;
}
}
sub checkconfig {
if (-e $configfile) {
open CONFIGFILE, "$configfile";
while (<CONFIGFILE>) {
if ($_ =~ m/perlpath = (.*)/) {
$perlpath = $1;
}
elsif ($_ =~ m/pppath = (.*)/) {
$pppath = $1;
}
elsif ($_ =~ m/gpgpath = (.*)/) {
$gpgpath = $1;
}
}
close CONFIGFILE;
}
else {
editpreferences();
}
}
sub editpreferences {
if (-e $configfile) {
open CONFIGFILE, "+<$configfile";
while (<CONFIGFILE>) {
if ($_ =~ m/perlpath = (.*)/) {
$perlpath = $1;
}
elsif ($_ =~ m/pppath = (.*)/) {
$pppath = $1;
}
elsif ($_ =~ m/gpgpath = (.*)/) {
$gpgpath = $1;
}
}
}
else {
$perlpath = can_run($^X);
$pppath = File::Spec->catfile($FindBin::Bin, $ppfile);
$pppath = File::Spec->catfile(dirname($perlpath), $ppfile)
unless -e $pppath;
$perlpath = '' unless -e $perlpath;
$pppath = '' unless -e $pppath;
open CONFIGFILE, ">>$configfile";
}
my $preferences = $main->DialogBox(-title => "Preferences");
my $prefframe = $preferences->Frame(-borderwidth => 5);
$prefframe->Label(-text => "Path to perl ")->grid(
( $prefframe->Entry(
-textvariable => \$perlpath,
-background => "white",
-width => 30
)
),
( $prefframe->Button(
-image => $main->Getimage("openfold"),
-command => [ sub { &openfile },
[ [ "Perl", ["$perlfile"] ], [ "All Files", ["*"] ] ],
\$perlpath
]
)
),
-padx => 1,
-pady => 2
);
$prefframe->Label(-text => "Path to pp ")->grid(
( $prefframe->Entry(
-textvariable => \$pppath,
-background => "white",
-width => 30
)
),
( $preferences->Button(
-image => $main->Getimage("openfold"),
-command => [ sub { &openfile },
[ [ "pp Batch File",
[ $ppfile ]
],
[ "All Files", ["*"] ]
],
\$pppath
]
)
),
-padx => 1,
-pady => 2,
);
$prefframe->pack();
my $answer = $preferences->Show();
if ($answer eq "OK") {
no warnings "uninitialized";
print CONFIGFILE "perlpath = $perlpath\n";
print CONFIGFILE "pppath = $pppath\n";
print CONFIGFILE "gpgpath = $gpgpath\n";
close CONFIGFILE;
sub { $preferences->destroy };
}
}
my $help_text;
sub help {
my $help = $main->DialogBox(-title => "Tkpp Help");
if (!$help_text) {
local $/;
seek DATA, 0, 0;
$help_text = <DATA>;
$help_text =~ s/.*?=head2/=head2/s;
$help_text =~ s/=head1 NOTES.*//s;
$help_text =~ s/=head2 (.*)\s+/* $1:\n/g;
$help_text =~ s/[LF]<(.*?)>/$1/g;
$help_text =~ s/C<(.*?)>/"$1"/g;
};
$help->Label(
-text => $help_text,
-justify => "left"
)->pack(-fill => "x");
$help->Show();
}
sub openfile {
my $types = shift();
my $file = shift();
$$file = $main->getOpenFile(
-filetypes => $types,
-initialdir => $$file
);
return ();
}
sub savefile {
my $types = shift();
my $file = shift();
$$file = $main->getSaveFile(
-filetypes => $types,
-initialdir => $$file
);
return ();
}
sub showdialog {
my $title = shift();
my $message = shift();
my $icon = shift();
if ($^O eq "MSWin32") {
my $messageBox = $main->messageBox(
-title => "$title",
-message => "$message",
-type => "OK",
-icon => "$icon"
);
}
else {
my $dialog = $main->DialogBox(-title => $title);
my $frame = $dialog->Frame(-borderwidth => 2);
$frame->Label(-width => 4)->grid($frame->Label());
$frame->Label(-bitmap => $icon)->grid(
$frame->Label(
-text => $message,
-justify => "left"
)
);
$frame->pack();
$dialog->bell();
$dialog->Show();
}
return 0;
}
sub splashimage {
my $splash_gif = << '.';
R0lGODlh8gB5AKUAAP///////vj4+Pb29vDw7+zr5Obl3d7e3NjX1Ojo58/OzNnXx8vIxMXDv767
t7m3tbWxsK+sqKimpKGdnZiSkpONjY+JiIyGhomEg4Z/f4F5eXtzc3dubnRra3FpaW9mZm1lZaaj
m2FgYGph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Kh+2ehklUJRLKaOb6QMQ
YLVDsAAR4AKvh5UJmZ9HK7ITu5+qQbaMYbYzEANGpZm5yblDcAAh4FHOISqMIrOnYrqQcqx6OylY
MRmVOwNLOQPTKZ85MACyKwQE4AIagANLIpodY6++eyq727v3SiGg1xVjgRknAAOt+yHEy5k4sKrL
CwAB8AA4YC46SXhOwQJei67oUhu1ARn0mxVbkS4BtBsaVivhSwNGRb7me77DkOoDOCIeLxAwYARG
ydLADuzAAfPA4vLAEUzBxnIsGIzAABwDM9DBS0kDL+CULhCp5ysEhWAAPADAa7ImSTmULvzCMNy6
Q9nBHPzCMmzDNdy6OszBHdzDPlzDRMmUTpkDg1vC6FsILvACNADARrWUK/zEUPzESGm5UKyUUkzF
SpnFSLnFU/zBnLkD6GbERFAIhpABPqDES7zETGlUbNzGbvzGcBzHcjzHTMmZLdBSYlwEZFwIDNAC
OeADIxnIgjzIhFzIhgySO4ADLsAAypvHjvzIkBzJkjzJlFzJlnzJmJzJmrzJnNzJnkynQQAAOw==
.
my %send_back = (1 => $splash_gif);
return ($send_back{ $_[0] });
}
sub myicon {
my $icon_gif = << '.';
R0lGODlhIAAgAOcAAComItra1qKiok5OSoqKfnp6dl5eXrKyrmpqZuLi2sLCuk5KRkZGOp6enubm
4nZ2coaGfpqWlu7u6tbWzkI+Om5ubmZmZn5+fpKOilJSTs7Oyra2rjIyKvLy7q6qonZubnZyblZW
VmZeXr66ssbGvpaOjvr6+oKCgmZiYnZqavb28mpmZlpaUn52do6GhioqJpaSknJmZsrKwm5iYt7e
2pqaljYyKnpubnJqaoqCgqaenoJ+epKKiurq5sK+tn56eqqmopqSknpybjY2Lm5mYjIuKo6KhtLS
yq6uoi4uJk5GRoZ+flpSUmJaWkpGQmpiYmpeXsrKyr6+usK+voqGgp6alt7a2l5aVi4uKlZOTl5W
VoJ6dpKSjm5mZtrW0uLi3sbGwtLS0np2crKuqo6KimJiVqKemp6WlkZCPrayrubi4rq2trq6uoaG
hq6qpjY2NqainlZSTvby8lpWUoaCfoqGhlpaWlJOSpKOjm5qZnJubnp2dvLy8sbCvsrGxlpWVmJe
XtLOyrq2sjo2LtbS0r66uoaCgsrKxkpGRqaiot7e3urq6tra2ubm5srGvtbSys7Kyk5KSoJ+ftbW
0vb29npycoJ6ep6amlZSUu7u7nZycjYyLl5aWlJOTqKenqqmpm5qarKyssLCvpqamuLi4rKurq6q
qjY2MkZCQraysv//////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////yH+FUNyZWF0ZWQgd2l0aCBU
aGUgR0lNUAAh+QQBCgD/ACwAAAAAIAAgAAAI/gD/mTDRwUGCgzQCKPQyqaFDhg4bTnh0hAaNf//U
qPEz5pMnT1XOlCiBwYiLky6MkEHJkkpKI0gSsGFzKQgMMmSW/NCkKcUHHF26xMABNCiRoE+giJgz
h4WGRIlsljhJZ0ulqz+J+vT5MyhSEVmyFJGhQ4fUk0sstWhR6UMKPXq4pkgBdMaMFTNE3LmTxBEc
ODBK8MCZI63aFppu3NADSAsgQDG6rMD75EnYF46g2uTBk8meHIUt/QiaoUKDT58M3V3xRIQIJkyS
yPiIJ4SByQIK4aSTwxLTCDQyqVBhpYXdyiLixMH8sYQkKQr5qFizxgUVLXv2qKHEnZKKT5WT/r5m
ggVSWRhBdJAixX3KFCqYHmjQoKI79y9rlULBhOkFWR0l4LECGGBwt8EGmrRhBR982McdH4II0toT
sPX1EQx4FNBII5TwkUoqQFhhAoPcZbJhJpQsskglUDyhhRYvQPKXYGSoSIkDJ5wAQQWUjDLKGipE
0EADCBRIiRSSvYiFIxeWUIeNimCAASl/MFJFFRXwwYWKbYTCnQaXEPHHH0s2WUJDlAQwwAAWNIBH
BRW8kQkLoICCSIOU6GBKFxWSEEEEZOCBB1SNhCGJJCZQEkIUUexRyArcGRAFgz/AMANsL/QRRBA4
8eCpDoIYYkgmi4zCICOhJMLdJXWsd4Mm/iuMiYUCf55UB044SZmGBBgQyIcXfmzYwg4NiYEXpj5I
aQgVVNRxqwt00FGHIi3k2IgpMBxySGWhhGLJE10o6cNIhYGWA7NLLFGHKZVkdwRiH+YFWgtPzDBm
EVLglO6+ou4LAw5/JkLUJZd08cRke1QGGxY+eGqJJUuAltYPPzzgQiV/TiIEJ5PNEN4HK4j5RxJS
nNTCDxCntVYLH1RywwcfRICEZHgRgQIKkfFJ3gg47dHCw4ddhUIlmsCMQyimVLZCF1BAkUdQTTRR
xAgnqVXJWlcFJYJbrmUhhg8xxDBDF1FnJa6nK19VSRchhNATDnPhELZXXSCAgCU/ccJJhxEN82D1
VTd0UeceH+hBlOBDEQXz4jgwxTBOaRP9gWIv06XV4lvNlUIMmFLtwsNpL35DW4rDzNPiP4HSxWUe
7As61oqJ/nLLgGcV2RNDDAHAP044oUQnWUQi/PCIFF+8EsgLjwgqzKNCARYvvDDIPwYYwMAQHGyy
CQfcd++995vY4H0RGP0TEAA7
.
my %send_back = (1 => $icon_gif);
return ($send_back{ $_[0] });
}
sub can_run {
my $cmd = $_[0];
require Config;
require ExtUtils::MakeMaker;
my $_cmd = $cmd;
return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
my $abs = File::Spec->catfile($dir, $_[0]);
return $abs if (-x $abs or $abs = MM->maybe_command($abs));
}
return;
}
__DATA__
=head1 SEE ALSO
L<pp>, L<PAR>
=head1 AUTHORS
Tkpp was written by Doug Gruber.
In the event this application breaks, you get both pieces ;)
=head1 COPYRIGHT
Copyright 2003, 2004, 2005, 2006 by Doug Gruber E<lt>doug(a)dougthug.comE<gt>,
Audrey Tang E<lt>cpan@audreyt.orgE<gt>.
Neither this program nor the associated L<pp> program impose any
licensing restrictions on files generated by their execution, in
accordance with the 8th article of the Artistic License:
"Aggregation of this Package with a commercial distribution is
always permitted provided that the use of this Package is embedded;
that is, when no overt attempt is made to make this Package's
interfaces visible to the end user of the commercial distribution.
Such use shall not be construed as a distribution of this Package."
Therefore, you are absolutely free to place any license on the resulting
executable, as long as the packed 3rd-party libraries are also available
under the Artistic License.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
See L<http://www.perl.com/perl/misc/Artistic.html>
=cut
|