You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "R. K . Mallah" <ra...@egurucool.com> on 2000/12/18 07:01:17 UTC

Problem in loading Apache::DBI

I get following error when i do

perl -e 'use Apache::Status;use Apache::DBI'

Can't locate object method "module" via package "Apache" at
/usr/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 202.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.


the problem is when preparing menu_item for Apache::Status method module is

not found under Apache,

do i have to install some other Apache module?

anyway i commented out  the if part and made it work like

Apache::Status->menu_item(

    'DBI' => 'DBI connections',
    sub {
        my($r, $q) = @_;
        my(@s) = qw(<TABLE><TR><TD>Datasource</TD><TD>Username</TD></TR>);
        for (keys %Connected) {
            push @s, '<TR><TD>', join('</TD><TD>', (split($;, $_))[0,1]),
"</TD></TR>\n";
        }
        push @s, '</TABLE>';
        return \@s;
   }

);

# ) if ($INC{'Apache.pm'} and Apache->module('Apache::Status'));


is it correct ?

why shouldn't it load without any modifications ?

Regards
Mallah



--
Rajesh Kumar Mallah,
Learning Universe Pvt. Ltd,
Piccadily House, 4th Floor,
275-276, Capt. Gaur Marg,
Okhla, Sriniwas puri,
New Delhi 110 065.
M : +919811255597
T : 91-11 6931601-04
W : http://www.egurucool.com
E : rajesh.m@egurucool.com