using constants in a module

B

brad

I am creating various modules and in these modules, I would like to be
able to use constant XXX => X;
just like it was declared in the .pl file that uses that module. How
is this possible.

declaring the constants in the module and using that module does not
work.
thanks
 
A

Anno Siegel

brad said:
I am creating various modules and in these modules, I would like to be
able to use constant XXX => X;
just like it was declared in the .pl file that uses that module. How
is this possible.

declaring the constants in the module and using that module does not
work.
thanks

You probably want to export them. See "perldoc Exporter".

Anno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,266
Messages
2,571,085
Members
48,773
Latest member
Kaybee

Latest Threads

Top