W3C home > Mailing lists > Public > www-rdf-perllib@w3.org > June 2001

perllib suggestion: change Algae.pm datasource API

From: Dan Brickley <danbri@w3.org>
Date: Tue, 26 Jun 2001 18:01:05 -0400 (EDT)
To: <www-rdf-perllib@w3.org>
cc: <eric@w3.org>
Message-ID: <Pine.LNX.4.30.0106261751260.18761-100000@tux.w3.org>

Hi Eric,

http://www.w3.org/1999/02/26-modules/
http://www.w3.org/2001/Talks/0505-perl-RDF-lib/
http://dev.w3.org/cvsweb/perl/modules/W3C/Rdf/Algae.pm?rev=1.41&content-type=text/x-cvsweb-markup

I've been looking at W3c::RDF::Algae.pm with an eye to dropping in
alternate backend database implementations, like we discussed recently.
I've also got a wrapper for the Squish RDF query language that I'll
contrib when I've got some tests implemented to be sure it works properly.

Anyway, a suggestion: It seems the way Algae.pm currently works, one needs
a class that implements W3C::RDF::RdfDB that can be constructed afresh by
the query engine, ie. the method W3C::RDF::Algae::checkForDBSpec() wants
to be passed a class name plus a bunch of initialisation parameters,
which'll allow it to create a new instance of some species of RDF database.

Suggestion:
Often one's application code will *already* have its hands on a reference
to such a database object, so it'd be nice if this could just be passed
to the query engine instead.

Currently you do: eval "require $dbSpec; \$\$pDb = new $dbSpec(\$parms);";

...could you hack it to take a Perl reference instead? Would this break
anything else? That way I can create RDF database instances and initialise
them without having to have Algae do that work...

cheers,

--danbri
Received on Tuesday, 26 June 2001 18:01:06 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 13:35:33 EDT