I just started using AxKit this week and I've been trying to develop a
tag library that performs a simple MySQL DB query and returns the output
in XML.  Whenever I try to run the XSP page which accesses the taglib, I
get the following error:
 
[Error] Can't locate object method "register" via package
"EEIT::PeopleTaglib" at
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Apache/AxKit/Lang
uage/XSP.pm line 203.
 
Here's the code for the taglib itself (EEIT::PeopleTaglib):
 
-----------cut------------
package EEIT::PeopleTaglib;
 
use Apache::AxKit::Language::XSP::TaglibHelper;
 
@ISA = qw( Apache::AxKit::Language::XSP::TaglibHelper );
 
$NS = 'http://eeit.nd.edu/PeopleTaglib/v1';
 
@EXPORT_TAGLIB = (
            'record($netid):as_xml=1',
);
 
use strict;
use EEIT::WebX;
 
sub record ($):as_xml=true {
my $netid = shift @_;
my %DB_EE_People = (            db         => 'EE_People',
                                                            host      =>
'services.ee.nd.edu',
                                                            user      =>
'',
                                                            passwd =>
'',
                                                );
 
            my $dbh = getDbHandle( \%DB_EE_People );
            my $sth = $dbh->prepare( "SELECT * FROM person WHERE
afsid=\"$netid\"" );
            $sth->execute;
            return( $sth->fetchrow_hashref );
}
 
-------------cut----------------
 
 
The 'getDbHandle()' subroutine comes from the EEIT::WebX module, which I
know works properly.  Also, here's my httpd.conf:
 
 
## AxKit
PerlModule AxKit
SetHandler perl-script
PerlHandler AxKit
DirectoryIndex index.xsp
AddHandler axkit .xml .xsp
AddHandler server-status .cgi
AxDebugLevel 10
AxCacheDir /tmp/.axcache/
AxGzipOutput On
 
## StyleMaps
AxAddStyleMap application/x-xpathscript
Apache::AxKit::Language::XPathScript
AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT
AxAddStyleMap application/x-xsp Apache::AxKit::Language::XSP
 
## TagLibs
AxAddXSPTaglib AxKit::XSP::Util
AxAddXSPTagLib AxKit::XSP::PerForm
AxAddXSPTaglib Apache::AxKit::Language::XSP::TaglibHelper
AxAddXSPTaglib EEIT::PeopleTaglib
 
 
I could use any insight you have.
 
Thanks,
Scott Turner

Reply via email to