Re: Exported Vars

2002-08-28 Thread david
t; right or not. > > When I pick up an exported vars from a package, is it becomes a > gobal var? it becomes a global variable in a sense that you don't have to prefix the variable with which package it belongs too. all varaibles(even the default one like @INC, @ISA etc) belong to a

Re: Exported Vars

2002-08-28 Thread Connie Chan
Thanks everybody, I've learn quite a lot in this lesson again. Anyway, I still not up the OO level in Perl, so, quite sort of information here I still need sometime to digest. Here is something I've simply test, but not confirm they are right or not. When I pick up an exported v

Re: Exported Vars

2002-08-26 Thread Janek Schleicher
Connie Chan wrote at Tue, 27 Aug 2002 00:40:26 +0200: > package A; > use strict; > require Exporter; > our @ISA = qw (Exporter); # What this actually for ?! > our @EXPORT = qw (%hash); > our %hash ; > > ... > My question is, will perl re- assign the hash whenever > a 'use package A' declared ?

Re: Exported Vars

2002-08-26 Thread drieux
On Monday, August 26, 2002, at 03:40 , Connie Chan wrote: > package A; > use strict; > require Exporter; > our @ISA = qw (Exporter); # What this actually for ?! One way to think of this as a way of stopping the questions about 'isa' - cf perldoc UNIVERSAL In this case it is an Exporter

Re: Exported Vars

2002-08-26 Thread david
Connie Chan wrote: > In package A, I did sth like this : > > package A; > use strict; > require Exporter; > our @ISA = qw (Exporter); # What this actually for ?! Exporter provides an easy way for you to make your module's variables and functions available for another package to use. the: our

Exported Vars

2002-08-26 Thread Connie Chan
In package A, I did sth like this : package A; use strict; require Exporter; our @ISA = qw (Exporter); # What this actually for ?! our @EXPORT = qw (%hash); our %hash ; # code code code code and code . # Do sth to assign values for %hash anyway 1; Then , in the main script, I will use A,