Re: our v. use vars - wasRe: use Getopt::Std; and use strict;

2002-05-11 Thread Paul Johnson
On Sat, May 11, 2002 at 08:43:13AM -0700, drieux wrote: > > On Friday, May 10, 2002, at 07:07 , Tanton Gibbs wrote: > > >Yes you can say > > > >our $opt_m; > > > >or > > > >use vars qw($opt_m); > > > >at the top of your program (depending on perl version). > > I've been preached the orthodoxy o

Re: our v. use vars - wasRe: use Getopt::Std; and use strict;

2002-05-11 Thread Felix Geerinckx
on Sat, 11 May 2002 18:10:41 GMT, Jonathan e. paton wrote: > You've never seen the implementation of 'use vars' then :) The > tail end of which is: > [...] > Which I assure you has a LOT to do with importing into symbol tables. > This is the reason 'use vars' is package scoped. Thanks for clar

Re: our v. use vars - wasRe: use Getopt::Std; and use strict;

2002-05-11 Thread Jonathan E. Paton
> > Note that 'use vars' is supposedly depreciated, so don't > > use it if your script depends on 5.6 features. Placing > > 'our' in a lexical scope probably makes it externally > > visible until you leave the scope, 'use vars' imports > > into your symbol table. Hope this is right :) > > That'

Re: our v. use vars - wasRe: use Getopt::Std; and use strict;

2002-05-11 Thread Felix Geerinckx
on Sat, 11 May 2002 17:00:27 GMT, Jonathan e. paton wrote: > Note that 'use vars' is supposedly depreciated, so don't > use it if your script depends on 5.6 features. Placing > 'our' in a lexical scope probably makes it externally > visible until you leave the scope, 'use vars' imports > into yo

Re: our v. use vars - wasRe: use Getopt::Std; and use strict;

2002-05-11 Thread Jonathan E. Paton
> > Yes you can say > > > > our $opt_m; > > > > or > > > > use vars qw($opt_m); > > > > at the top of your program (depending on perl version). > > I've been preached the orthodoxy of the later - but > have never understood the distinction... > > Yes, have read coping with scoping. > > anyone h

Re: our v. use vars - wasRe: use Getopt::Std; and use strict;

2002-05-11 Thread Jonathan E. Paton
> > Yes you can say > > > > our $opt_m; > > > > or > > > > use vars qw($opt_m); > > > > at the top of your program (depending on perl version). > > I've been preached the orthodoxy of the later - but > have never understood the distinction... > > Yes, have read coping with scoping. > > anyone h

our v. use vars - wasRe: use Getopt::Std; and use strict;

2002-05-11 Thread drieux
On Friday, May 10, 2002, at 07:07 , Tanton Gibbs wrote: > Yes you can say > > our $opt_m; > > or > > use vars qw($opt_m); > > at the top of your program (depending on perl version). I've been preached the orthodoxy of the later - but have never understood the distinction... Yes, have read copi

Re: use Getopt::Std; and use strict;

2002-05-10 Thread John W. Krahn
Hans Holtan wrote: > > Hi everyone, > I have a problem using Getopt::Std. I depend on use strict for all my > code, and when I use Getopt::Std all the variables it creates (to > hold the command line option values) are flagged by strict because > they have not been scoped. I get errors like this:

Re: use Getopt::Std; and use strict;

2002-05-10 Thread Tanton Gibbs
Yes you can say our $opt_m; or use vars qw($opt_m); at the top of your program (depending on perl version). - Original Message - From: "Hans Holtan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 10, 2002 9:30 PM Subject: use Getopt::Std;

use Getopt::Std; and use strict;

2002-05-10 Thread Hans Holtan
Hi everyone, I have a problem using Getopt::Std. I depend on use strict for all my code, and when I use Getopt::Std all the variables it creates (to hold the command line option values) are flagged by strict because they have not been scoped. I get errors like this: Line 70: Global symbol "$o