Variable question

R

Raj

Hi,

I was wondering what this means:

$opt_f = $Name::Email::Config::config_dir.'/email-config.xml'
unless $opt_f;

I've not seen the $Name::Email::Config::config_dir notation before so I was
wondering if someone could explain.

Thanks in advance for enlightening me!

Regards
 
A

Anno Siegel

Raj said:
Hi,

I was wondering what this means:

$opt_f = $Name::Email::Config::config_dir.'/email-config.xml'
unless $opt_f;

I've not seen the $Name::Email::Config::config_dir notation before so I was
wondering if someone could explain.

It's the scalar variable $config_dir in the package Name::Email::Config.
See perldoc perldata.

Anno
 
R

Raj

Anno Siegel said:
It's the scalar variable $config_dir in the package Name::Email::Config.
See perldoc perldata.

Hi Anno,

That's exactly what I thought it was...however I cannot find a package
called Name::Email::Config, which is why I got confused.

I will obviously have to dig around a bit more to find out where it is!

Thanks for your help.

Regards,
Raj
 
A

Anno Siegel

Raj said:
Hi Anno,

That's exactly what I thought it was...however I cannot find a package
called Name::Email::Config, which is why I got confused.

It doesn't have to be defined or been used for anything else. The
package is created when it doesn't exist. It wouldn't make much sense
to use a package for just a single scalar, but it's certainly possible.

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

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top