PAR-Packer
view release on metacpan or search on metacpan
contrib/gui_pp/gpp view on Meta::CPAN
$hw->minsize( 100, 30 );
$hw->Button( -text => 'Close', -command => sub { $hw->withdraw } )->pack( -fill => 'x' );
my $parser = Pod::Simple::Text->new();
my $pod;
$parser->output_string( \$pod );
$parser->parse_string_document($pp_text);
$hwt = $hw->Scrolled( "Text",
-scrollbars => 'osw',
-wrap => 'none',
-height => 1,
-width => 1
)->pack( -expand => 1, -fill => 'both' );
$hwt->insert( 'end', $pod );
$hw->focus();
}
else {
$hw->deiconify();
$hw->raise();
$hw->focus();
}
}
sub run_pp {
my @pp_opts = ();
for ( 0 .. $#opts ) {
if ( $chkd[$_] ) {
if ( ( $type[$_] eq '' ) or ( $type[$_] =~ /:/ and $value[$_] eq '' ) ) {
push @pp_opts, '-' . $opts[$_];
}
elsif ( $type[$_] =~ /[ifs]$/ ) {
push @pp_opts, '-' . $opts[$_];
push @pp_opts, $value[$_];
}
elsif ( $type[$_] =~ /[fs][@%]/ ) {
my @multi = ();
my $value = $value[$_];
# Look for quoted strings first, then non-blank strings,
# separated by spaces, commas or semicolons
while ( $value =~ /\G\s*((['"])[^\2]*?\2)\s*[,;]?|\G\s*([^\s,;]+)\s*[,;]?/g ) {
push( @multi, defined($1) ? $1 : $3 );
}
for $value (@multi) {
push @pp_opts, '-' . $opts[$_];
push @pp_opts, $value;
}
}
}
}
if ($output_file) {
push @pp_opts, '-o';
push @pp_opts, $output_file;
}
if ($source_file) {
push @pp_opts, $source_file;
}
print "$pp @pp_opts\n";
$mw->Busy();
system $pp, @pp_opts;
$mw->Unbusy();
print "Done.\n\n";
} ## end sub run_pp
( run in 1.520 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )