|
From: Nick C. <ni...@cl...> - 2002-01-28 23:43:16
|
On Mon, Jan 28, 2002 at 06:34:07PM -0500, Olivier Dragon wrote:
> On Mon, Jan 28, 2002 at 06:07:55PM -0500, Joseph F. Ryan wrote:
> > Secondly, the use of subs to create constants like that is ridiculous. Try
> > the constant pragma :)
> >
> > use constant DEBUGGING => 0;
> > use constant EMULATE_MATTS_CODE => 0;
> > use constant MAILPROG => '/usr/lib/sendmail -oi -t';
>
> I wouldn't say that using it is ridiculous to use subroutines to create
> constants, but this alternative seems reasonable. Is is in the standard
> library of 5.004_04? Does this integrate in strings as easily as a
> normal variable, eg.
use constant works in 5.00404, but it is a little messy to
interpolate it into a string.
> print "Mail program is MAILPROG";
print "Mail program is @{[ MAILPROG ]}";
The big problem (with both constants and subs) is that it makes
the config section of the script look a bit different, and we're
aiming to make it very easy for users with no technical skills to
change from Matt's version to ours by copying their config over.
--
Nick
|