2010-02-06 126 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 

感谢像往常一样进行任何指导/指针/建议/评论:)

回答