modules/sort/private data

2001-08-16 Thread 'cduck' Chris Grierson
i am new to perl modules (well, any perl more advanced than CGI business). i have made a module that returns a hash reference (the hash is a hash of a hash, populated by $outer{$inner} = { a=>b, c=>d }). when i use a sort subroutine ({ $a->{'field'} <=> $b->{'field'}) on a hash in its module, the

Re: Private Data

2001-06-18 Thread Paul
--- Nick Transier <[EMAIL PROTECTED]> wrote: > Thanks, do you start the brackets before the "package blah" call, or > after. > I.E. is it {package blah; #stuff; } or package blah; {#stuff;} ? It depends on how tightly private you want those variables. I always put the package statement inside t

Re: Private Data

2001-06-18 Thread Chas Owens
On 18 Jun 2001 14:22:06 -0500, Nick Transier wrote: > Does the C++ notion of private data have a similar structure in perl, when > defining packages, I find that when I try to define global variables inside > the package, but outside of all the subroutines, I get a million errors.

Re: Private Data

2001-06-18 Thread Me
> Does the C++ notion of private data have a similar structure in perl, when > defining packages, I find that when I try to define global variables inside > the package, but outside of all the subroutines, I get a million errors. > Thanks, Use my to declare variables local

Re: Private Data

2001-06-18 Thread Brett W. McCoy
On Mon, 18 Jun 2001, Nick Transier wrote: > Does the C++ notion of private data have a similar structure in perl, when > defining packages, I find that when I try to define global variables inside > the package, but outside of all the subroutines, I get a million errors. > Thanks,

Re: Private Data

2001-06-18 Thread Paul
--- Nick Transier <[EMAIL PROTECTED]> wrote: > Does the C++ notion of private data have a similar structure in perl, > when defining packages, I find that when I try to define global > variables inside the package, but outside of all the subroutines, I > get a million err

Private Data

2001-06-18 Thread Nick Transier
Does the C++ notion of private data have a similar structure in perl, when defining packages, I find that when I try to define global variables inside the package, but outside of all the subroutines, I get a million errors. Thanks, -Nick