Hi folks!

I'm trying to get a minimal SimpleTaglib snippet working, but I'm not 
doing to good. I'm on a Debian Woody box, but I have the axkit, 
axkit-examples and axkit-xsp-webutils packages from Sarge installed. My 
Perl installation is the one from Woody, i.e. 5.6.1. I think the 
SimpleTaglib is also from Sarge. I just tried to install it from CPAN, 
but that seemed to pull Axkit, and that is perhaps not such a bright 
idea right now?

Well, anyway, that was not really the topic. First, I tried to work on 
some DBI-stuff, but after running into trouble, I stripped down as much 
as I could, and now this is the Perl code I've got in 
/usr/local/lib/site_perl/Kjetils/XSP/Test1.pm:
#! /usr/bin/perl

package Kjetils::XSP::Test1;
    
$NS = "http://www.kjernsmo.net/taglibs/dbi/test1";; 
          
use Apache::AxKit::Language::XSP::SimpleTaglib;


package Kjetils::XSP::Test1::Handlers;

sub report  
{    
    $data = "data1";
    return $data;
}

This is the XSP:
<?xml version="1.0"?>
<?xml-stylesheet href="NULL" type="application/x-xsp"?>

    <xsp:page
      xmlns:xsp="http://www.apache.org/1999/XSP/Core";
      xmlns:test="http://www.kjernsmo.net/taglibs/dbi/test1";>
  <data>
    <title>My Test Database</title>
    <test>
      <test:report/>
    </test>
  </data>
</xsp:page>

And this is in my httpd.conf
PerlModule AxKit
Options -All +Indexes +FollowSymLinks
    # Tell mod_dir to translate / to /index.xml or /index.xsp
DirectoryIndex index.xsp
AddHandler axkit .xml .xsp
AxDebugLevel 10
AxGzipOutput On
AxAddXSPTaglib AxKit::XSP::Util
AxAddStyleMap application/x-xsp Apache::AxKit::Language::XSP
AxAddXSPTaglib Kjetils::XSP::Test1

(some whitespace deleted for brevity, I bet you can guess where it came 
from). 

When looking up the URL http://localhost/test1.xsp , I get an error 

[Sun Nov 24 20:18:48 2002] [error] [client 127.0.0.1] [AxKit] 
[Backtrace] Compilation failed: Bareword "data1" not allowed while 
"strict subs" in use at (eval 11) line 16.
        Error::throw('Apache::AxKit::Exception::Error', '-text', 'Compilation 
failed: Bareword "data1" not allowed while "strict s...') called at 
/usr/lib/perl5/Apache/AxKit/Language/XSP.pm line 114
        Apache::AxKit::Language::XSP::handler('Apache::AxKit::Language::XSP', 
'AxKit::Apache=SCALAR(0x81ad670)', 
'Apache::AxKit::Provider::File=HASH(0x818291c)', 
'Apache::AxKit::Provider::File=HASH(0x81b06e0)', 1) called at 
/usr/lib/perl5/AxKit.pm line 623
        AxKit::process_request('AxKit::Apache=SCALAR(0x81ad670)', 
'Apache::AxKit::Provider::File=HASH(0x818291c)', 'ARRAY(0x80d8cd8)') 
called at /usr/lib/perl5/AxKit.pm line 437
        AxKit::run_axkit_engine('AxKit::Apache=SCALAR(0x81ad670)', 
'Apache::AxKit::Provider::File=HASH(0x818291c)') called at 
/usr/lib/perl5/AxKit.pm line 264
        eval {...} called at /usr/lib/perl5/AxKit.pm line 255
        AxKit::main_handler('AxKit::Apache=SCALAR(0x81ad670)', 
'Apache::AxKit::Provider::File=HASH(0x818291c)') called at 
/usr/lib/perl5/AxKit.pm line 172
        AxKit::fast_handler('AxKit::Apache=SCALAR(0x81ad670)') called at 
/dev/null line 0
        eval {...} called at /dev/null line 0

....and I haven't got much clue what this means. Originally, I was 
experimenting with hashrefs, and then I also had the struct({}) 
attribute in the report sub, but I got pretty much the same error. 
Seamingly, it then stopped on the first key of the hash.

I've read up on what "strict subs" mean, but I really can't see what 
that has to do with me.... :-) 

Can anybody clue me in, please? 


BTW, is there a searchable archive of this list anywhere (yeah, I know 
about http://axkit.org/cgi-bin/ezmlm-cgi/3 )? Anybody know if the 
archives are indexed by Google (stuff like that helps a lot, really)?

Cheers,

Kjetil
-- 
Kjetil Kjernsmo
Astrophysicist/IT Consultant/Skeptic/Ski-orienteer/Orienteer/Mountaineer
[EMAIL PROTECTED]  [EMAIL PROTECTED]  [EMAIL PROTECTED]
Homepage: http://www.kjetil.kjernsmo.net/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to