in reply to Perl Module Inheritance
Is all fine enough, but why would mat::Session::User need to inherit from mat::Session? I note that to get at the mat::Session from within mat::Session::User::create() you either need to make the mat::Session object available globally (i.e. using some sort of singleton class/function) or you'd need to pass in the session explicitly. Either way, there isn't any need to have mat::Session::User inherit from mat::Session, and it will probably be clearer not to inherit from the session at all.my $x=mat::User->new{first=>'foo', last=>'bar'}; mat::Session::User->create($x);
|
|---|