<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Sorry if this email is a bit vague, however I am
currently learning to use Catalyst.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I would like to inherit a number of my classdbi
model classes from a base class:</FONT></DIV>
<DIV><FONT face=Arial size=2>I have created a new directory under my package
NIM, in a new subdirectory called Base</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>In my model classs:
NIM::M::CDBI::Llulinterface:-</FONT></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>###snipet</DIV></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2>package NIM::M::CDBI::Llulinterface;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>use strict;<BR>use base
NIM::Base::M::L;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>=head1 NAME</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>NIM::M::CDBI::Llulinterface - CDBI Model Component
Table Class<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>###end of snipet</DIV></FONT>
<DIV><FONT face=Arial size=2>In NIM::Base::M::L.pm ( a simple
class)</FONT></DIV>
<DIV><FONT face=Arial size=2>mk-solaris3-dev# more NIM/Base/M/L.pm<BR>package
NIM::Base::M::L;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>sub atest {</FONT></DIV>
<DIV><FONT face=Arial size=2> print "Inheritated
call";<BR>}<BR>1</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>However When I run my package:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>perl -e 'use NIM', It seems that inheritance does
work, and I can call the method
NIM::M::CDBI::Llulinterface->atest </FONT></DIV>
<DIV><FONT face=Arial size=2>except I get a warning like this:-</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>mk-solaris3-dev# perl -e 'use NIM'<BR>[Mon
May 2 13:50:41 2005] [catalyst] [debug] Debug messages enabled<BR>[Mon
May 2 13:50:42 2005] [catalyst] [debug] Loaded engine
"Catalyst::Engine::CGI"<BR>[Mon May 2 13:50:45 2005] [catalyst] [debug]
Loaded tables "btinport btoutport chassis chassiscard component componentstatus
datainport dataoutport exchange ftiepair growthtree growthtype lineinterface
llufblock llufinterface llufp llulblock llulinterface llutblock llutinterface
ltiepair man model modelconstraint querycache rack ttiepair"<BR>Couldn't require
"NIM::M::CDBI::Llulinterface", "Unknown error<BR>Compilation failed in require"
at /usr/local/lib/perl5/site_perl/5.8.5/Catalyst/Engine.pm line 739<BR>[Mon
May 2 13:50:46 2005] [catalyst] [debug] Initialized components
"NIM::M::CDBI::Llulblock NIM::M::CDBI::Rack NIM::M::CDBI::Ltiepair
NIM::M::CDBI::Btoutport NIM::C::netprovisioning NIM::M::CDBI::Llulinterface
NIM::M::CDBI::Datainport NIM::M::CDBI::Dataoutport NIM::V::TT
NIM::M::CDBI::Growthtree NIM::M::CDBI::Growthtype NIM::M::CDBI::Chassiscard
NIM::M::CDBI::Btinport NIM::M::CDBI::Componentstatus NIM::M::CDBI::Llufinterface
NIM::M::CDBI::Llufblock NIM::M::CDBI::Chassis NIM::M::CDBI::Model
NIM::M::CDBI::Component NIM::M::CDBI::Ttiepair NIM::C::mycontroller
NIM::M::CDBI::Man NIM::M::CDBI::Querycache NIM::M::CDBI::Modelconstraint
NIM::M::CDBI NIM::M::CDBI::Llufp NIM::M::CDBI::Ftiepair NIM::C::btactions
NIM::C::Growth NIM::M::CDBI::Lineinterface NIM::M::CDBI::Llutblock
NIM::M::CDBI::Exchange NIM::M::CDBI::Llutinterface"<BR>[Mon May 2 13:50:46
2005] [catalyst] [info] NIM powered by Catalyst 4.34<BR>[Mon May 2
13:50:46 2005] [catalyst] [debug] "NIM" defined "!default" as
"CODE(0x41a70c)"<BR>[Mon May 2 13:50:46 2005] [catalyst] [debug] Loaded
engine "Catalyst::Engine::CGI"<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>However If I simply require the package, (using a
require statement this seems to work without error). Is this something to do
with the Module::Pluggable::Fast modules used in catalyst ?? Is this the correct
way to build base classes for my classdbi classes ??</FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<DIV><FONT face=Arial size=2>Also, is there anyway I can turn off the
Class::DBI::Loader. I am using an Oracle database, and startup times for my
package seems significantly slower, then if I simply defined the
columns/relationships of each on my tables within the Model classes. I guess the
Class::DBI::Loader is performing a select * from user_constraints,
user_cons_columns. I will be using FCGI for all the parts of the application
which have a web interface, but I was hoping to reuse the Model/Controller part
to create a backend API interface to the application (which may not be running
as a persistent application)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any help on any of the points would be greatly
appreciated.</DIV></FONT></BODY></HTML>