Re: How to declare global constants?
- From: Jim Gibson <jgibson@xxxxxxxxxxxxxxxxx>
- Date: Mon, 30 Apr 2007 10:07:59 -0700
In article <zyeZh.8362$Dq6.6529@edtnps82>, Louis <t051315@xxxxxxxxxxx>
wrote:
I would like to declare a constant in a module (.pm), so other perl
scripts can use the module and the constant it contains.
I tried
use constant BASEDIR => 'path_name';
in the module.
But when I use this module, perl complains that BASEDIR is a bareword.
How do you make this work?
Really appreciate your comment.
You should post a complete, minimal program that demonstrates the
problem. Otherwise, we are just guessing at the cause.
One guess: are you referring to BASEDIR in the program that uses the
module or the actual name <module>::BASEDIR?
This group is defunct. Try comp.lang.perl.misc in the future.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
.
- Follow-Ups:
- Re: How to declare global constants?
- From: Louis
- Re: How to declare global constants?
- References:
- How to declare global constants?
- From: Louis
- How to declare global constants?
- Prev by Date: Re: Perl/MySQL/Arrays
- Next by Date: Re: How to declare global constants?
- Previous by thread: How to declare global constants?
- Next by thread: Re: How to declare global constants?
- Index(es):