
pavan538
New User
Dec 28, 2012, 7:23 PM
Post #1 of 2
(4162 views)
|
how to store class object in perl session
|
Can't Post
|
|
Emp.pm Package Emp; sub new { my($class,$args )=@_; my $self = bless{},$class; $self->{name}=args->name; $self->{id}=args->id; return $self; } sub getName{ $self=shift; return $self->{name}; } thers is one session object $session = new $session("driver::file",undef,{Directory=>"/tmp"}; $emp = new Emp({name=>'pavan',id=>101}); session->param("emp",$emp); but it i open the session file from tmp directory it shows undef for emp. is it possible to store the entire object of emp in session?
(This post was edited by pavan538 on Dec 28, 2012, 7:25 PM)
|