nlafferty has asked for the wisdom of the Perl Monks concerning the following question:
I have a package file with this chunk of code. Notice I changed use vars qw($user $admin); to our ($user, $admin);. Is that better?Name "common::auth::admin" used only once: possible typo at Name "common::auth::user" used only once: possible typo at
In my main program file.package common::auth; our ($user, $admin); #use vars qw($user $admin); $user = $ENV{"REMOTE_USER"}; $admin = "admin"; # Set to the Administrators username
I don't see any sense in using the full package name for those variables throught my program. Thanks#!/usr/bin/perl -w use strict; require "common.sub"; $username = "common::auth::user"; $admin = "common::auth::admin";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: suppress an error
by BazB (Priest) on May 01, 2002 at 21:17 UTC | |
by nlafferty (Scribe) on May 01, 2002 at 21:24 UTC | |
|
Re: supress an error
by Necos (Friar) on May 01, 2002 at 21:58 UTC | |
|
Re: supress an error
by boo_radley (Parson) on May 01, 2002 at 21:40 UTC | |
by nlafferty (Scribe) on May 01, 2002 at 21:52 UTC | |
|
Re: supress an error
by blakem (Monsignor) on May 02, 2002 at 08:16 UTC |