conflict between "use constant" and perlapp?

conflict between "use constant" and perlapp?

am 01.02.2007 15:59:12 von Deane.Rothenmaier

This is a multipart message in MIME format.
--===============1372355693==
Content-Type: multipart/alternative;
boundary="=_alternative 00525EB286257275_="

This is a multipart message in MIME format.
--=_alternative 00525EB286257275_=
Content-Type: text/plain; charset="us-ascii"

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.

Thanks for your thoughts.

Deane Rothenmaier
Systems Architect
Walgreens Corp.
847-914-5150

"On two occasions I have been asked [by members of Parliament], 'Pray, Mr.
Babbage, if you put into the machine wrong figures, will the right answers
come out?' I am not able rightly to apprehend the kind of confusion of
ideas that could provoke such a question." -- Charles Babbage
--=_alternative 00525EB286257275_=
Content-Type: text/html; charset="us-ascii"



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.



Thanks for your thoughts.



Deane Rothenmaier

Systems Architect

Walgreens Corp.

847-914-5150



"On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question." -- Charles Babbage

--=_alternative 00525EB286257275_=--


--===============1372355693==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1372355693==--

Re: conflict between "use constant" and perlapp?

am 02.02.2007 10:14:06 von Bill Luebkert

Deane.Rothenmaier@walgreens.com 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
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: conflict between "use constant" and perlapp?

am 02.02.2007 16:24:58 von Jan Dubois

On Fri, 02 Feb 2007 01:14:06 -0800, Bill Luebkert
wrote:

>> 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:

I got a private reply yesterday and it turned out that Deane is using
PerlApp 4.0. So it may very well be a problem in PDK 4, but it works
fine in PDK 6 and PDK 7 Beta.

Cheers,
-Jan
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs