[ABE.pm] Finding my own objects

Faber J. Fedor faber at linuxnj.com
Wed May 17 10:05:17 PDT 2006


I'm finally getting around to writing the HTML report I mentioned in a
previous thread.  First thing I need to do is to generate the data and
to do that, I want to write my own objects. So let me run my design past
you guys and then tell you what my problem is then you can tell me if
I'm on the right track.

The final output is an aggregation of smaller reports. Each report is
going to do an SQL stmt and format the resulting dataset. There are
three types of repors: a SummaryReport, a ExposureReport and a SectorReport.
Each of these will inherit common methods from TransparencyReport.  Some
common methods include style of output (ASCII, HTML, XHTML) , database
handling, etc.

My program is going to call the *Report objects, combine them with CSS
and Javascript to form a final HTML output using the ideas John
mentioned in a previous thread.

So, am I totally off the wall here or what?

And now, for my current problem...

I like to keep my Perl modules in the $MY_LIBPATH directory.  In each of
my programs I have 

use lib $ENV{MY_LIBPATH} || die "\n$MY_LIBPATH is not set! Arrgh!\n";
use mymodule;

at the top.

I created my TransparencyReport.pm, put it in $MY_LIBPATH and used it.
That worked.

What I really want is to "use SummaryReport" in my program (where
SummaryReport.pm is an empty subclass in $MY_LIBPATH) and have
SummaryReport.pm inherit from TransparencyReport.pm.  Unfortunately, 
I get

Can't locate package TransparencyReport for @SummaryReport::ISA at
./runTransparencyReport.pl line 31

How do I get $MY_LIBPATH/SummaryReport.pm to inherit from
$MY_LIBPATH/TransparencyReport.pm?  Do I need to modify the ISA path in
all of my modules/objects?



-- 
 
Regards,
 
Faber Fedor
President
Linux New Jersey, Inc.
908-320-0357
800-706-0701

http://www.linuxnj.com





More information about the ABE-pm mailing list