ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl5-Agents
perl5-Agents
Perl gig in Boston
by Don Catino other posts by this author
Nov 1 2000 7:13PM messages near this date
Re: configuration package | They All Laughed at Me
Does anyone want a Perl contract in Boston?

Skills include:
experience with 7K lines + Perl packages
Perl 5 module / OOD w/ Perl
Perl on Unix and NT
SQL using Perl DBI/DBD interface
ClearCase
Perl/Tk
modperl and or other Perl-based web programming

This is a 3 - 6 month gig w/ our client in Boxboro, MA.
We can probably pay up to $100/hr on a 1099
* we promote full disclosure of bill rates and use a fixed
$10/hr mark-up.

Respect,
Don Catino
978-443-0066 x 202
978-443-2271 f
www.dpcit.com <http://www.dpcit.com> 


-----Original Message-----
From: owner-perl5-agents@[...].com [mailto:owner-perl5-agents@[...].com]On
Behalf Of Steve Purkis
Sent: Wednesday, November 01, 2000 11:26 AM
To: Cristina Bulfon
Cc: Diego Zamboni; Perl Mailing List
Subject: Re: configuration package


One quick note - if you're writing for Perl 5.6, you should still be
using @ISA...  use the 'base' pragma instead:

	use base qw (Exporter);

The rest remains the same.

regards,
-Steve


Cristina Bulfon wrote:
> 
>  Hi Diego,
> 
>  thanks, but in the meanwhile I found the solution :
> 
>  BEGIN {
> 
>  use Exporter();
>  use vars qw (@ISA @EXPORT $VERSION);
> 
>  $VERSION= 1.00;
>  @ISA = qw (Exporter);
> 
>  @EXPORT = qw (@Site
>              @Semaphore
>              $ConfigDir
>              $BaseDir
>              $ReleaseDir
>             );
>  }
>  use vars @EXPORT;
> 
>  # Define global variable
>  ........
> 
>  END {}
> 
>          cristina
> 
>  On Wed, 11 Oct 2000, Diego Zamboni wrote:
> 
>  >
>  > bulfon@[...].EDU said:
>  > > my problem is: I'd really like to naming the global array in main
>  > > program like @Site or @Configuration rather than "@Configuration::Site"
>  > >  ..  I read in Perl CookBook that I have to use @EXPORT but doesn't
>  > > work
>  >
>  > You could make Configuration.pm not a package in itself, but just contain
the
>  > corresponding variable declarations. Here's what I have done in some
programs
>  > that require a configuration file. The file is called Config.pl, and it only
>  > contains the following:
>  >
>  > #---------- start of Config.pl
>  > %Config=(
>  >       param1 => value1,
>  >       param2 => value2,
>  >       ...
>  >       );
>  >
>  > 1;
>  > #----------- end of Config.pl
>  >
>  > Then in the main program I do:
>  >
>  > eval 'require "Config.pl"';
>  > die "Error: $@" if $@;
>  >
>  > and then I can just use $Config{param1} etc to access the configuration
>  > parameters. I use a hash, but you could just as well use simple variables
like
>  > @Site, @Semaphore, etc.
>  >
>  > Hope this helps,
>  > --Diego
>  >
>  >
>  >
> 
>  _____________________________________________________________________________
> 
>         Cristina Bulfon              E-mail Cristina.Bulfon@[...].edu
>  Stanford Linear Accelerator Center  Phone +1-650-926-5028
>  PO Box 4349, M/S 88                 Fax   +1-650-926-3329
>  Stanford, CA 94309, USA
>  _____________________________________________________________________________

--
 Steve Purkis                 Technical Architect
 steve@[...].com           www.ebookers.com
Thread:
Diego Zamboni
Chris Fryburger
Cristina Bulfon
Steve Purkis
Don Catino

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved