[MKDoc-modules] Error using MKDoc::XML with Petal - splitpath

William McKee william at knowmad.com
Fri Oct 3 22:18:56 BST 2003


Greetings Jean-Michel et al,

Now that Petal is starting to make use of MKDoc::XML, I guess I'll be
posting between lists. I hope that I'm sending this message to the right
list....

First, the address for registering for this list in the MKDoc::XML pod
is incorrect. It should be mkdoc-modules-subscribe at lists.webarch.co.uk
(notice the '-subscribe' in the email). When I got the reject message, I
realized what went wrong.

Now, on to my error report! In all cases I am using Petal v1.10_05 and
Perl 5.6.1 on a Debian Woody server.

I'm just getting started with making my files valid XHTML so that Petal
can parse them. I have successfully gotten the attached file to be
validated as XHTML by the W3C validation service. However, when I try to
use Petal to display the document (which does not contain any Petal
commands at the moment), I get the following error message:

[PETAL ERROR] Can't locate object method "splitpath" via package
"File::Spec" (perhaps you forgot to load "File::Spec"?)

There is no call to splitpath in my document, so I'm not sure where this
message is coming from.


If I fall back to using Petal::Parser::HTB, I'm getting the following
error in Petal 1.10_5:

[PETAL ERROR] Can't use string ("") as a subroutine ref while "strict
refs" in use at /usr/local/share/perl/5.6.1/Petal.pm line 320.

The line in question is:
	 $res = $coderef->($hash);

Should Petal.pm be modified to not use strict refs at this point? By
training and habit, I start all my Perl programs with use strict and
notice that you are using it in Petal.pm as well. Other pages and other
projects do not show these errors. Perhaps the error message is saying
that $hash is null? Shouldn't there be a check for that somewhere before
we try to call it?

It seems bizarre that I get two different errors when using two
different parsers. Perhaps this is more of a Petal issue than an
MKDoc::XML issue. It's going to be kinda hard to know which list to post
these messages to.

Thanks,
William

-- 
Knowmad Services Inc.
http://www.knowmad.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webarch.co.uk/pipermail/mkdoc-modules/attachments/20031003/b87013e2/category.html


More information about the MKDoc-modules mailing list