File: 11_tmql.pl

package info (click to toggle)
libtm-perl 1.56-7
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,692 kB
  • ctags: 1,084
  • sloc: perl: 35,266; makefile: 48
file content (29 lines) | stat: -rw-r--r-- 450 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use TM::Materialized::AsTMa;

my $tm = new TM::Materialized::AsTMa (inline => '
sacklpicka (cat)
bn: Der Sacklpicka

rho (person)
oc (blog): http://kill.devc.at/

(owns)
owner: rho
owned: sacklpicka

(is-subclass-of)
subclass: person
superclass: mammal

(is-subclass-of)
subclass: cat
superclass: mammal

');

$tm->sync_in;

use TM::QL;
my $q = new TM::QL ('for $a in %_ // owns return $a');
use Data::Dumper;
warn Dumper $q->eval ({ '%_' => $tm });