Stanisław T. Findeisen schrieb:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello there
My application consists of several files. Some of them are to be run as
CGI scripts, the others from command line. There is also a common file
with constants and shared routines.
The question is: what is
Marc Lucksch wrote:
Stanisław T. Findeisen schrieb:
Subject: 2 files, 1 package, shared constants
Hello there
My application consists of several files. Some of them are to be run as
CGI scripts, the others from command line. There is also a common file
with constants and shared routines
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello there
My application consists of several files. Some of them are to be run as
CGI scripts, the others from command line. There is also a common file
with constants and shared routines.
The question is: what is the most standard way to export
Stanisław T. Findeisen wrote:
snip
Funny thing is that in two.pl MyPackage-MY_FIRST_CONSTANT works, but
neither of these:
print '' . MY_FIRST_CONSTANT . \n;
print '' . MyPackage::MY_FIRST_CONSTANT . \n;
Concatenation seems like a bad idea. Try:
print MY_FIRST_CONSTANT, \n;
print
Gunnar Hjalmarsson wrote:
Concatenation seems like a bad idea. Try:
print MY_FIRST_CONSTANT, \n;
print MyPackage::MY_FIRST_CONSTANT, \n;
Ee... you mean . instead of , right? This:
print MY_FIRST_CONSTANT . \n;
print MyPackage::MY_FIRST_CONSTANT . \n;
yields this output:
Stanisław T. Findeisen wrote:
Gunnar Hjalmarsson wrote:
Concatenation seems like a bad idea. Try:
print MY_FIRST_CONSTANT, \n;
print MyPackage::MY_FIRST_CONSTANT, \n;
Ee... you mean . instead of , right?
No, I mean ,. You can print() a list.
--
Gunnar Hjalmarsson
Email:
Stanisław T. Findeisen wrote:
My application consists of several files. Some of them are to be run as
CGI scripts, the others from command line. There is also a common file
with constants and shared routines.
First: Please disregard my theory about concatenation. Concatenation is
ok, which is