in reply to RE: Re: OO problems
in thread OO problems
However, your method doesn't look quite right. You create an anonymous hash, assign its reference to a scalar, and then dereference and bless it. In theory, that should work, but you'll have to do two layers of indirection when trying to get at the tied hash. I think something like the following is more in line with what you want. (Disclaimer: I haven't tried this, and I've never used Apache::Session, but it's a little cleaner.)
sub new { my $class = shift; my $id = shift; my %h = (); tie %h, 'Apache::Session::MySQL', $id { # whatever goes here }; return bless(\%h, $class); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: RE: Re: OO problems
by steveAZ98 (Monk) on Jul 24, 2000 at 06:31 UTC | |
|
RE: RE: RE: Re: OO problems
by steveAZ98 (Monk) on Jul 25, 2000 at 00:28 UTC |