[redland-dev] Mystery Parser Failure
Dave Beckett
dave.beckett at bristol.ac.uk
Fri May 20 15:19:38 BST 2005
On Fri, 20 May 2005 14:39:09 +0100, Kieron Taylor <krt1 at soton.ac.uk> wrote:
> Greetings,
>
> I have a valid RDF document that parses correctly when put through
> Rapper, but using the Perl interface to the Redland parser, I get the
> following error:
>
> Can't use string ("/home/dump/triplestore/rdf/c/b/0") as a HASH ref
> while "strict refs" in use at /usr/share/perl5/RDF/Redland/Parser.pm
> line 147.
>
> The string it complains about is a literal within the document that it
> appears to have sliced the end off. How should I proceed to find out
> what is going wrong.
Looks to me like you are trying to pass a string in when a URI object
is expected. That's what it says - you can't use a string as an
object (in perl terminology an object=HASH ref).
i.e you are doing
$parser->parse_into_model("/home/dump/triplestore/rdf/c/b/0", undef, $model);
Make a proper file: redland URI object and try again:
$uri=new RDF::Redland::URI("file://home/dump/triplestore/rdf/c/b/0");
$parser->parse_into_model($uri, $uri, $model);
Dave
More information about the redland-dev
mailing list