in reply to Re: CGI::Application::Session and Inheritance
in thread CGI::Application::Session and Inheritance

Here is my CGI script. pretty much taken right out of CGI::Application


#!/usr/bin/perl -w use myTest::Index; use strict; my $web = myTest::Index->new(); $web->run();

Replies are listed 'Best First'.
Re^3: CGI::Application::Session and Inheritance
by dragonchild (Archbishop) on Apr 19, 2005 at 18:09 UTC
    Create an instance of myTest::module1, not myTest::Index, and make the changes to home() that I gave you earlier. Your app will work now.
      Ok, sorrry I am still a little (ok, a lot) confused.
      Right now I have (cgi script)->(Index.pm)->(module1.pm)
      Are you saying I should be doing everything that requires access to my session object needs to be done in Index.pm? Or if I create an instance of module1 in my cgi script, it must be done in that module? Thanks for your insite, I will contine to try to make sense yours and Joost's sugestions. Thanks
        as was said above, you need to create an instance of you child class (module1), not your parent class (Index). The parent class knows nothing about the child class. That's what OOP is about.