Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Accessing reference to tied Apache::Session hash

by impossiblerobot (Deacon)
on Aug 01, 2002 at 17:27 UTC ( [id://186853]=perlquestion: print w/replies, xml ) Need Help??

impossiblerobot has asked for the wisdom of the Perl Monks concerning the following question:

I'm using Apache::Session in my application, tying a hash, then passing around a reference to that hash.

Unfortunately, I can't figure out how to access the underlying object from the reference, so that I can delete the session information.

I've tried:

$tied($session)->delete();

and:

$session->delete();

which both fail: $tied($session) returns undef (I suppose since the $session scalar isn't tied) and $session (of course) isn't an object (blessed reference), so I can't call the delete() method on it.

What is the proper way to (de)reference this?


Impossible Robot

Replies are listed 'Best First'.
Re: Accessing reference to tied Apache::Session hash
by perrin (Chancellor) on Aug 01, 2002 at 17:53 UTC
    Try this:
    tied(%{$session})->delete();

      Boy do I feel stupid! :-)


      Impossible Robot

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://186853]
Approved by kodo
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-20 04:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found