[EMAIL PROTECTED] wrote:
>
> Wizards,
>
> When I run my program from the command line, all is well, but when I
> compile it to an executable using perlapp, I get the following error:
>
> "Constant name 'HASH(0xb6acd0)' has invalid characters at foo.pl line
> 39. BEGIN failed--compilation aborted at foo.pl line 41."
>
> and the script dies. Here's WHAT's causing the problem:
>
> use constant {
> CONT => 0, # THIS is line 39
> EXIT => 1
> };
>
> Anybody got a thought as to WHY that's causing a problem? Again, it
> works fine when interpreted, only a compiled EXE has the problem.
Works for me on PerlApp 6.0.2 build 203380.
Post the smallest complete script, version of PerlApp you're using
and the commandline to PerlApp that you're using. I used:
use strict;
use warnings;
use constant {
CONT => 0,
EXIT => 1
};
sub use_it {
my ($code, $msg) = @_;
print "code = $code, message = \"$msg\"\n";
}
use_it (CONT, "hello world");
__END__
Running it:
> perlapp --exe foo.exe foo.pl
code = 0, message = "hello world"
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs