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

Similar Threads


Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top