Ben Eagle <> wrote:
> Thanks, I think I will go the route of making a module "Config.pm"
> 
> Although it seems there are many ways to do that, which one is the
> best or "proper way" of making one, I don't want to start coding any
> more sloppy then I already do.  
> 
> I have tried to make a config.pm module but still have troubles
> getting it to work, I am not sure why it won't find the module,  use
> lib "lib/"; use Dell::Config doesn't get me to my lib directory where
> I have the folder "Dell" and Config.pm inside of that.   
> 
> Not exactly sure what I am doing wrong but strict seems to not like it
> 
> Config.pm
> ___________
> use strict;
> package Dell::Config;
> 
> our($Template, $ChartImageName, $bubbleName, $imageType);
> 
> 
> $Template = qq(Dell_Deployment_Optimization_Report.pdf);
> $ChartImageName = "DellDOChart";
> $bubbleName = "Bubble";
> $imageType =".png";
> 
> 1; #Return True
> 
> 
> BuildReport.pl
> ______________
> 
> use strict;
> use warnings;
> use lib "lib/";
> use Dell::Config
> 
> 
> code here....
> 
> 
> any ideas what I am doing wrong?

The first thing you are doing wrong is not giving us enough information.
A small, self contained example (SSCE), that we can cut and paste and
run, along with some idea of what is happening and how that differs from
what you expected/wanted, is invaluable in helping us to help you.

I can see a couple of potential problems with what you have posted. The
issue of naming and locating your module has been addressed by others.
In addition, the variables in your module will not be visible to the
code that "uses" it, unless you fully qualify them, e.g.
$Dell::Config::Template. Another way to make them visible is to export
them, see 'perldoc Exporter'. For example, Dell/Config.pm could look
like this:

use strict;
use warnings;

package Dell::Config;

use base "Exporter";
our @EXPORT = qw{$Template $ChartImageName $bubbleName $imageType};

our $Template = qq(Dell_Deployment_Optimization_Report.pdf);
our $ChartImageName = "DellDOChart";
our $bubbleName = "Bubble";
our $imageType =".png";

1;

HTH

-- 
Brian Raven 

_________________________________________

The information contained in this e-mail is confidential and solely 
for the intended addressee(s). Unauthorised reproduction, disclosure, 
modification, and/or distribution of this email may be unlawful. If you 
have received this email in error, please notify the sender immediately 
and delete it from your system. The views expressed in this message 
do not necessarily reflect those of Atos Euronext Market Solutions.
_________________________________________



=================================
Atos Euronext Market Solutions Disclaimer
=================================
The information contained in this e-mail is confidential and solely for the 
intended addressee(s). Unauthorised reproduction, disclosure, modification, 
and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender immediately 
and delete it from your system. The views expressed in this message do not 
necessarily reflect those of Atos Euronext Market Solutions.

L'information contenue dans cet e-mail est confidentielle et uniquement 
destinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. 
Toute copie, publication ou diffusion de cet email est interdite. Si cet e-mail 
vous parvient par erreur, nous vous prions de bien vouloir prevenir 
l'expediteur immediatement et d'effacer le e-mail et annexes jointes de votre 
systeme. Le contenu de ce message electronique ne represente pas necessairement 
la position ou le point de vue d'Atos Euronext Market Solutions.

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to