I was wondering if any of you might be able to shed some light on an
issue I am having.
I am actually using the CGI::Application framework, and
CGI::Application::Plugin::Session on top of that.
I am not having any trouble with passing around the session object. In
fact, once the CGI object is created, the session can be reached like
$cgi->session->some_session_method (like param). I have tested all of
this by just using CGI::Session and I get the same problem.
Now for the problem.
I create an object. In my case this is a Bio::Tree::Tree object. I will
call it $treeObj.
I store this object as session data like so.
sub step 1 {
$cgi->session->param("treeObj", $treeObj);
}
When I re-initialize the session at some later time, I retrieve the
stored data and try to do something with $treeObj;.
sub step 2 {
my $treeObj = $cgi->session->param("treeObj");
print $treeObj->total_branch_length(). }
Although this would normally work, it now returns the following error msg:
Error executing run mode 'showbranch': Can't locate object method
"get_Descendents" via package "Bio::Tree::NodeNHX" at
/usr/lib/perl5/site_perl/5.8.3/Bio/Tree/Tree.pm line 216.
at /home/mbradley/PIPELINE/Bris/cgi-bin/InitForm.pl line 9
Now is a good time to mention that $treeObj is a collection of
Bio::Tree::NodeNHX objects that inherit from Bio::Tree::NodeI. The call
to 'total_branch_length' loops through the collection of
Bio::Tree::NodeNHX and calls "get_Descendents". Since it can't find this
method, it seems that the problem has to do with lack of proper
inheritance (between NodeNHX objects and NodeI.pm).
All of this would work just fine if I did step 2 before closing out the
session. Thus, somehow when the session is re-initialized the object
loses some of its properties.
Any ideas?
Thanks.
mike
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]