~ubuntu-branches/debian/squeeze/redland-bindings/squeeze

« back to all changes in this revision

Viewing changes to perl/example.pl

  • Committer: Bazaar Package Importer
  • Author(s): Dave Beckett
  • Date: 2009-04-07 00:24:21 UTC
  • mfrom: (0.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090407002421-dce2r4otm5vqtheg
Tags: 1.0.8.1-2
* Use new sections ruby, php for librdf-ruby and php5-librdf respectively.
* Merge features from ubuntu packaging.  Thanks to Matthias Klose
  (not taking linker -Wl,--as-needed since that makes dyloading fail
  to pull in raptor symbols):
  debian/rules:
  - get python lib dir from distutils
  - make dh_pycentral use symlinks
  debian/python-librdf.examples:
  - add data/dc.rdf to examples dir and adjust example.py
    to point to it (Closes: #402612)
* Patch python/Makefile.in so it can allow the include dir to be
  overridden by the particular python version build in debian/rules
  using PYTHON_INCLUDES

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#
3
3
# example.pl - Redland eaxmple Perl program
4
4
#
5
 
# $Id: example.pl 13257 2007-12-07 22:56:10Z laalto $
6
 
#
7
 
# Copyright (C) 2000-2005 David Beckett - http://purl.org/net/dajobe/
 
5
# Copyright (C) 2000-2005 David Beckett - http://www.dajobe.org/
8
6
# Copyright (C) 2000-2005 University of Bristol - http://www.bristol.ac.uk/
9
7
10
8
# This package is Free Software or Open Source available under the
36
34
my $creator_uri=new RDF::Redland::URI("http://purl.org/dc/elements/1.1/creator");
37
35
 
38
36
warn "\nCreating statement\n";
39
 
my $statement=new RDF::Redland::Statement(RDF::Redland::Node->new_from_uri("http://purl.org/net/dajobe/"),
 
37
my $statement=new RDF::Redland::Statement(RDF::Redland::Node->new_from_uri("http://www.dajobe.org/"),
40
38
                                          $creator_uri,
41
39
                                          new RDF::Redland::Node("Dave Beckett"));
42
40
die "Failed to create RDF::Redland::Statement\n" unless $statement;
108
106
$statement=undef;
109
107
 
110
108
 
111
 
my $home=RDF::Redland::Node->new_from_uri("http://purl.org/net/dajobe/");
 
109
my $home=RDF::Redland::Node->new_from_uri("http://www.dajobe.org/");
112
110
warn "\nSearching model for targets of subject ",$home->uri->as_string," predicate ", $creator_uri->as_string, "\n";
113
111
my(@nodes)=$model->targets($home, new RDF::Redland::Node($creator_uri));
114
112
die "Failed to find any targets matching\n"