CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate: how to store class object in perl session: Edit Log

New User

Dec 28, 2012, 7:23 PM

Views: 3050
how to store class object in perl session

Package Emp;
sub new {
my($class,$args )=@_;
my $self = bless{},$class;
return $self;
sub getName{
return $self->{name};

thers is one session object

$session = new $session("driver::file",undef,{Directory=>"/tmp"};
$emp = new Emp({name=>'pavan',id=>101});

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)

Edit Log:
Post edited by pavan538 (New User) on Dec 28, 2012, 7:25 PM

Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives