1# *
2# *     Copyright (c) 2000-2006 Alberto Reggiori <areggiori@webweaving.org>
3# *                        Dirk-Willem van Gulik <dirkx@webweaving.org>
4# *
5# * NOTICE
6# *
7# * This product is distributed under a BSD/ASF like license as described in the 'LICENSE'
8# * file you should have received together with this source code. If you did not get a
9# * a copy of such a license agreement you can pick up one at:
10# *
11# *     http://rdfstore.sourceforge.net/LICENSE
12# *
13# * Changes:
14# *     version 0.1 - 2000/11/03 at 04:30 CEST
15# *     version 0.31
16# *             - added use (include) of all RDFStore modules suite
17# *		- updated documentation
18# *     version 0.4
19# *		- updated documentation
20# *		- removed FindIndex module
21# *     version 0.50
22# *		- updated to be the corner stone of the RDF storage implemented in C and XS (lots of C and XS code really hoping to gain
23# *		  some speed and credibility here :) Here is the place where all magics happen....almost
24# *
25
26package RDFStore;
27
28use strict;
29use Carp;
30use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD $use_XSLoader);
31
32#disable crapy 'Use of uninitialized value in subroutine entry ' nightmare warnings; can we do it in the XS code in a portable and back-compatible way??
33$SIG{__WARN__} = sub { return if($_[0] =~ /^Use of uninitialized value in subroutine entry/); warn $_[0]; };
34
35require Exporter;
36use AutoLoader;
37BEGIN {
38    $use_XSLoader = 1 ;
39    eval { require XSLoader } ;
40
41    if ($@) {
42        $use_XSLoader = 0 ;
43        require DynaLoader;
44        @ISA = qw(DynaLoader);
45    };
46};
47
48@ISA = qw(Exporter DynaLoader);
49
50# Items to export into callers namespace by default. Note: do not export
51# names by default without a very good reason. Use EXPORT_OK instead.
52# Do not simply export all your public functions/methods/constants.
53@EXPORT = qw();
54
55$VERSION='0.51';
56
57sub AUTOLOAD {
58    # This AUTOLOAD is used to 'autoload' constants from the constant()
59    # XS function.  If a constant is not found then control is passed
60    # to the AUTOLOAD in AutoLoader.
61
62    my $constname;
63    ($constname = $AUTOLOAD) =~ s/.*:://;
64    croak "& not defined" if $constname eq 'constant';
65    my $val = constant($constname, @_ ? $_[0] : 0);
66    if ($! != 0) {
67	if ($! =~ /Invalid/) {
68	    $AutoLoader::AUTOLOAD = $AUTOLOAD;
69	    goto &AutoLoader::AUTOLOAD;
70	}
71	else {
72		croak "Your vendor has not defined RDFStore macro $constname";
73	}
74    }
75    no strict 'refs';
76    *$AUTOLOAD = sub () { $val };
77    goto &$AUTOLOAD;
78}
79
80if ($use_XSLoader) {
81	XSLoader::load("RDFStore", $VERSION);
82} else {
83	bootstrap RDFStore $VERSION;
84};
85
86# Preloaded methods go here.
87# Autoload methods go after =cut, and are processed by the autosplit program.
88
891;
90
91__END__
92
93=head1 NAME
94
95RDFStore - Perl extesion to store and query RDF graphs
96
97=head1 SYNOPSIS
98
99	use RDFStore;
100
101=head1 DESCRIPTION
102
103RDFStore is......
104
105The code is partially derived from B<Windex>, a free-text search perl extension written by Dirk-Willem van Gulik <dirkx@webweaving.org> and Nick Hibma <n_hibma@van-laarhoven.org>.
106
107=head1 Exported constants
108
109=head1 Exported functions
110
111=head1 AUTHORS
112
113	Alberto Reggiori <areggiori@webweaving.org>
114	Dirk-Willem van Gulik <dirkx@webweaving.org>
115
116=head1 SEE ALSO
117
118perl(1).
119
120=cut
121