2010-02-06 128 views
3

我試圖使用與PAR::Packer綁定的Filter::Crypto上的pp實用程序將Perl腳本打包爲EXE。但那裏有一些問題。沒有過濾器,事情就好了。有了它,沒有。我認爲它與腳本中的DATA部分有關。下面的簡化腳本可能會演示這個問題,但我不確定我的問題是否是操作系統特定的。問題是這樣的:當我使用什麼過濾::加密模塊做數據部分?

pp --gui -o 1.exe test.pl 

EXE按預期工作。它在DATA部分顯示內容。但與

pp --gui -f Crypto -M Filter::Crypto::Decrypt -o 2.exe test.pl 

EXE不輸出任何內容。

use Win32::GUI; 
use strict; 
use warnings; 

my $mw = new Win32::GUI::DialogBox(
    -text   => 'Test', 
    -left   => 300, 
    -top   => 100, 
    -left   => 60, 
    -width  => 200, 
    -height  => 200, 
); 

$mw->Show(); 

my $result = $mw->AddTextfield(
    -left   => 0, 
    -top   => 40, 
    -size   => [180,100], 
    -vscroll =>1, 
    -multiline => 1, 
); 

my $button = $mw->AddButton(
    -name   => 'button', 
    -text   => 'Go', 
    -left   => 120, 
    -top   => 10, 
    -visible =>1, 
); 

Win32::GUI::Dialog; 

sub button_Click { 

while(<DATA>) { 
    $result->Append("$_\r\n"); 
} 
} 

__DATA__ 
This is LINE1 
This is LINE2 
This is LINE3 

感謝像往常一樣進行任何指導/指針/建議/評論:)

回答