blib/lib/PMLTQ/TypeMapper.pm

filter: Statementstmt 17.8% 30 / 168 Branchbran 0.0% 0 / 74 Conditioncond 0.0% 0 / 48 MC/DCmcdc 0.0% 0 / 30 Subroutinesub 31.0% 9 / 29 Podpod 0.0% 0 / 15 totaltotal 10.7% 39 / 364 CC 59 SCAR 37.6
CC
59
Cov
10%
_get_fsfile
90.0
get_relation_target_type
90.0
_find_pmlrf_relations_for_type
72.0
CRAP 42.8
« blib/lib/PMLTQ/Relation/TreexFileIterator.pm ↑ Summary blib/lib/PMLTQ/Command/init.pm »
1 package PMLTQ::TypeMapper;
2 1 our $AUTHORITY = 'cpan:MATY';
3 1 $PMLTQ::TypeMapper::VERSION = '1.2.2';
4 # ABSTRACT: Helper methods for PML::Schema, relations and PML::Node types
5  
6 1 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Treex::PML::Schema;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 ▶use PMLTQ::Common (qw(uniq first));
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use PMLTQ::Relation;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use UNIVERSAL::DOES;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 1 PMLTQ::Relation->load();
17  
18 BEGIN { # TredMacro should work in TrEd 2.0
19 1 ▶ eval {
Subroutine BEGIN: called CC=1 SCAR=0.4
20 1 require TrEd::MacroAPI::Default;
21 0 TrEd::MacroAPI::Default->import;
22 };
23 }
24  
25 sub new {
26 0 ▶ my ($class,$opts)=@_;
Subroutine new: not called CC=7 SCAR=40.3
Pod undocumented
27 0 ▶ $opts||={};
Condition0%0/2
$opts ||= {}
l!l
00
MC/DC0%0/1
$opts ||= {}
$opts
Truth table0%0/2
A
A= $opts
Aresult
11
00
28 my $what = ($opts->{file}?1:0) +
29 ($opts->{fsfile}?1:0) +
30 0 ▶ ($opts->{filelist}?1:0);
Branch: 3 branches
BranchTrueFalseTotal
$opts->{'file'} ? : 0 0 0
$opts->{'fsfile'} ? : 0 0 0
$opts->{'filelist'} ? : 0 0 0
31 0 ▶ croak("Neither file, fsfile, nor filelist were specified!") unless $what;
Branch: 1 branch
BranchTrueFalseTotal
unless $what 0 0 0
32 0 ▶ croak("Options file, fsfile, filelist are exclusive!") if $what>1;
Branch: 1 branch
BranchTrueFalseTotal
if $what > 1 0 0 0
33 my $self = bless {
34 fsfile => $opts->{fsfile},
35 file => $opts->{file},
36 filelist => $opts->{filelist},
37 0 }, $class;
38 0 return $self;
39 }
40  
41 sub get_schema_for_query_node {
42 0 ▶ my ($self,$node)=@_;
Subroutine get_schema_for_query_node: not called CC=2 SCAR=17.9
Pod undocumented
43 0 my $decl = $self->get_type_decl_for_query_node($node);
44 0 ▶ return $decl && $decl->schema;
Condition0%0/3
$decl && $decl->schema
!ll&&!rl&&r
000
MC/DC0%0/2
$decl && $decl->schema
$decl $decl->schema
Truth table0%0/3
A && B
A= $declB= $decl->schema
ABresult
0X0
100
111
45 }
46 sub get_schema_for_type {
47 0 ▶ my ($self,$type)=@_;
Subroutine get_schema_for_type: not called CC=5 SCAR=34.0
Pod undocumented
48 0 ▶ if ($type eq '*') {
Branch: 2 branches
BranchTrueFalseTotal
if ($type eq '*') { } 0 0 0
elsif ($type =~ m[^(?:([^/]+):)\*$]) { } 0 0 0
49 0 my @schemas = $self->get_schemas;
50 0 ▶ if (@schemas == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (@schemas == 1) { } 0 0 0
51 0 return $schemas[1];
52 } else {
53 0 return undef;
54 }
55 } elsif ($type =~ m{^(?:([^/]+):)\*$}) {
56 0 my $schema_name = $1;
57 0 my ($schema) = grep { $_->get_root_name eq $schema_name } $self->get_schemas;
58 0 return $schema;
59 }
60 0 my $decl = $self->get_decl_for($type);
61 0 ▶ return $decl && $decl->get_schema;
Condition0%0/3
$decl && $decl->get_schema
!ll&&!rl&&r
000
MC/DC0%0/2
$decl && $decl->get_schema
$decl $decl->get_schema
Truth table0%0/3
A && B
A= $declB= $decl->get_schema
ABresult
0X0
100
111
62 }
63  
64 sub get_schema_name_for {
65 0 ▶ my ($self,$type)=@_;
Subroutine get_schema_name_for: not called CC=2 SCAR=17.9
Pod undocumented
66  
67 0 my $schema = $self->get_schema_for_type($type);
68 0 ▶ return $schema ? $schema->get_root_name : undef;
Branch: 1 branch
BranchTrueFalseTotal
$schema ? : 0 0 0
69 }
70  
71 sub _get_fsfile {
72 0 ▶ my ($self)=@_;
Subroutine _get_fsfile: not called CC=9 SCAR=45.0
73 0 my $fsfile = $self->{fsfile};
74 0 ▶ return $fsfile if $fsfile;
Branch: 1 branch
BranchTrueFalseTotal
if $fsfile 0 0 0
75 0 my $file = $self->{file};
76 0 my $fl;
77 0 ▶ if ($file) {
Branch: 2 branches
BranchTrueFalseTotal
if ($file) { } 0 0 0
elsif ($fl = TredMacro::GetFileList($self->{'filelist'})) { } 0 0 0
78 0 ▶ if (ref($file) and UNIVERSAL::DOES::does($file,'Treex::PML::Document')) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $file and UNIVERSAL::DOES::does($file, 'Treex::PML::Document')) { } 0 0 0
Condition0%0/3
ref $file and UNIVERSAL::DOES::does($file, "Treex::PML::Document")
!ll&&!rl&&r
000
MC/DC0%0/2
ref $file and UNIVERSAL::DOES::does($file, "Treex::PML::Document")
ref $file UNIVERSAL::DOES::does($file, "Treex::PML::Document")
Truth table0%0/3
A and B
A= ref $fileB= UNIVERSAL::DOES::does($file, "Treex::PML::Document")
ABresult
0X0
100
111
79 0 $self->{file} = $file->filename;
80 0 return $self->{fsfile} = $file;
81 } else {
82 return ($self->{fsfile} =
83 0 ▶ ((first { $_->filename eq $file } TredMacro::GetOpenFiles())
Subroutine __ANON__: not called CC=1 SCAR=6.9
Condition0%0/3
&first(sub { $_->filename eq $file; } , TredMacro::GetOpenFiles()) || TredMacro::Open($file, {'-preload', 1})
l!l&&r!l&&!r
000
MC/DC0%0/2
&first(sub { $_->filename eq $file; } , TredMacro::GetOpenFiles()) || TredMacro::Open($file, {'-preload', 1})
&first(sub { $_->filename eq $file; } , TredMacro::GetOpenFiles()) TredMacro::Open($file, {'-preload', 1})
Truth table0%0/3
A || B
A= &first(sub { $_->filename eq $file; } , TredMacro::GetOpenFiles())B= TredMacro::Open($file, {'-preload', 1})
ABresult
1X1
011
000
84 || TredMacro::Open($file, {-preload=>1})));
85 }
86 } elsif ($fl = TredMacro::GetFileList($self->{filelist})) {
87 0 my %fl;
88 0 my @files = $fl->files;
89 0 @fl{ @files } = ();
90 0 ▶ return $self->{fsfile} = ((first { exists($fl{$_->filename}) } TredMacro::GetOpenFiles())||
Subroutine __ANON__: not called CC=1 SCAR=6.9
Condition0%0/6
&first(sub { exists $fl{$_->filename}; } , TredMacro::GetOpenFiles()) || $files[0] && TredMacro::Open(TredMacro::AbsolutizeFileName($files[0], $fl->filename), {'-preload', 1})
l!l&&r!l&&!r
000
$files[0] and TredMacro::Open(TredMacro::AbsolutizeFileName($files[0], $fl->filename), {"-preload", 1})
!ll&&!rl&&r
000
MC/DC0%0/3
&first(sub { exists $fl{$_->filename}; } , TredMacro::GetOpenFiles()) || $files[0] && TredMacro::Open(TredMacro::AbsolutizeFileName($files[0], $fl->filename), {'-preload', 1})
&first(sub { exists $fl{$_->filename}; } , TredMacro::GetOpenFiles()) $files[0] TredMacro::Open(TredMacro::AbsolutizeFileName($files[0], $fl->filename), {"-preload", 1})
Truth table0%0/4
A || B and C
A= &first(sub { exists $fl{$_->filename}; } , TredMacro::GetOpenFiles())B= $files[0]C= TredMacro::Open(TredMacro::AbsolutizeFileName($files[0], $fl->filename), {"-preload", 1})
ABCresult
1XX1
0111
00X0
0100
91 $files[0] && TredMacro::Open(TredMacro::AbsolutizeFileName($files[0],$fl->filename),{-preload=>1}));
92 }
93 }
94  
95 sub get_schema {
96 0 ▶ my ($self,$schema_name)=@_;
Subroutine get_schema: not called CC=3 SCAR=24.8
Pod undocumented
97 0 ▶ if ($schema_name) {
Branch: 1 branch
BranchTrueFalseTotal
if ($schema_name) 0 0 0
98 0 my ($ret) = grep { $_->get_root_name eq $schema_name } $self->get_schemas;
99 0 return $ret;
100 }
101 0 ▶ my $fsfile = $self->_get_fsfile || return;
Condition0%0/2
$self->_get_fsfile || (return)
l!l
00
MC/DC0%0/1
$self->_get_fsfile || (return)
$self->_get_fsfile
Truth table0%0/2
A
A= $self->_get_fsfile
Aresult
11
00
102 0 return PML::Schema($fsfile);
103 }
104  
105 sub get_schemas {
106 0 ▶ my ($self)=@_;
Subroutine get_schemas: not called CC=2 SCAR=17.9
Pod undocumented
107 0 ▶ my $fsfile = $self->_get_fsfile || return;
Condition0%0/2
$self->_get_fsfile || (return)
l!l
00
MC/DC0%0/1
$self->_get_fsfile || (return)
$self->_get_fsfile
Truth table0%0/2
A
A= $self->_get_fsfile
Aresult
11
00
108 0 return uniq( map PML::Schema($_), ($fsfile, TredMacro::GetSecondaryFiles($fsfile)));
109 }
110  
111 sub get_schema_names {
112 0 ▶ my ($self)=@_;
Subroutine get_schema_names: not called CC=1 SCAR=6.9
Pod undocumented
113 0 return [uniq(grep { defined } map { $_->get_root_name } $self->get_schemas)];
114 }
115  
116 sub get_type_decl_for_query_node {
117 0 ▶ my ($self,$node)=@_;
Subroutine get_type_decl_for_query_node: not called CC=1 SCAR=6.9
Pod undocumented
118 0 return $self->get_decl_for(PMLTQ::Common::GetQueryNodeType($node));
119 }
120  
121 sub get_decl_for {
122 0 ▶ my ($self,$type)=@_;
Subroutine get_decl_for: not called CC=2 SCAR=17.9
Pod undocumented
123 0 my $ret = eval { PMLTQ::Common::QueryTypeToDecl($type,$self->get_schemas) };
124 0 ▶ warn $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
125 0 return $ret;
126 }
127  
128 sub get_node_types {
129 0 ▶ my ($self,$schema_name)=@_;
Subroutine get_node_types: not called CC=2 SCAR=17.9
Pod undocumented
130 return [sort map PMLTQ::Common::DeclToQueryType( $_ ), map $_->node_types,
131 0 ▶ grep { $schema_name ? ($_->get_root_name eq $schema_name) : 1 }
Branch: 1 branch
BranchTrueFalseTotal
$schema_name ? : 0 0 0
132 $self->get_schemas
133 ];
134 }
135  
136 sub _find_pmlrf_relations {
137 0 ▶ my ($self)=@_;
Subroutine _find_pmlrf_relations: not called CC=7 SCAR=40.3
138 0 my @schemas = $self->get_schemas;
139 0 my @relations=();
140 0 my %relations;
141 0 for my $schema (@schemas) {
142 0 for my $type ($schema->node_types) {
143 0 my $type_name = PMLTQ::Common::DeclToQueryType($type);
144 0 for my $path ($type->get_paths_to_atoms({ no_nodes=>1, no_childnodes => 1 })) {
145 0 my $decl = $type->find($path);
146 0 ▶ $decl=$decl->get_content_decl unless $decl->is_atomic;
Branch: 1 branch
BranchTrueFalseTotal
unless $decl->is_atomic 0 0 0
147 0 ▶ if ($decl->get_decl_type == PML_CDATA_DECL and
Branch: 1 branch
BranchTrueFalseTotal
if ($decl->get_decl_type == 8 and $decl->get_format eq "PMLREF") 0 0 0
Condition0%0/3
$decl->get_decl_type == 8 and $decl->get_format eq "PMLREF"
!ll&&!rl&&r
000
MC/DC0%0/2
$decl->get_decl_type == 8 and $decl->get_format eq "PMLREF"
$decl->get_decl_type == 8 $decl->get_format eq "PMLREF"
Truth table0%0/3
A and B
A= $decl->get_decl_type == 8B= $decl->get_format eq "PMLREF"
ABresult
0X0
100
111
148 $decl->get_format eq 'PMLREF') {
149 0 push @relations, $path;
150 0 $relations{$type_name}{$path}='#any';
151 }
152 }
153 }
154 }
155 0 $self->{pmlrf_relations_hash}=\%relations;
156 0 return $self->{pmlrf_relations} = [sort @relations];
157 }
158  
159 sub _find_pmlrf_relations_for_type {
160 0 ▶ my ($self,$type_name)=@_;
Subroutine _find_pmlrf_relations_for_type: not called CC=8 SCAR=42.8
161 0 my @schemas = $self->get_schemas;
162 0 my @relations=();
163 0 my $relations_hash = $self->get_pmlrf_relations_hash; # init
164 0 my $decl = $self->get_decl_for($type_name);
165 0 ▶ return [] unless $decl;
Branch: 1 branch
BranchTrueFalseTotal
unless $decl 0 0 0
166 0 for my $path ($decl->get_paths_to_atoms({ no_nodes=>1, no_childnodes => 1 })) {
167 0 my $mdecl = $decl->find($path);
168 0 ▶ next if $mdecl->get_role eq '#KNIT';
Branch: 1 branch
BranchTrueFalseTotal
if $mdecl->get_role eq "#KNIT" 0 0 0
169 0 ▶ unless ($mdecl->is_atomic) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($mdecl->is_atomic) 0 0 0
170 0 $mdecl=$mdecl->get_content_decl ;
171 0 ▶ next if $mdecl->get_role eq '#KNIT';
Branch: 1 branch
BranchTrueFalseTotal
if $mdecl->get_role eq "#KNIT" 0 0 0
172 }
173 0 ▶ if ($mdecl->get_decl_type == PML_CDATA_DECL and
Branch: 1 branch
BranchTrueFalseTotal
if ($mdecl->get_decl_type == 8 and $mdecl->get_format eq "PMLREF") 0 0 0
Condition0%0/3
$mdecl->get_decl_type == 8 and $mdecl->get_format eq "PMLREF"
!ll&&!rl&&r
000
MC/DC0%0/2
$mdecl->get_decl_type == 8 and $mdecl->get_format eq "PMLREF"
$mdecl->get_decl_type == 8 $mdecl->get_format eq "PMLREF"
Truth table0%0/3
A and B
A= $mdecl->get_decl_type == 8B= $mdecl->get_format eq "PMLREF"
ABresult
0X0
100
111
174 $mdecl->get_format eq 'PMLREF') {
175 0 push @relations, $path;
176 0 $relations_hash->{$type_name}{$path}='#any';
177 }
178 }
179 0 return [sort @relations];
180 }
181  
182 sub get_pmlrf_relations {
183 0 ▶ my ($self,$qnode_or_type)=@_;
Subroutine get_pmlrf_relations: not called CC=6 SCAR=37.4
Pod undocumented
184 0 ▶ if ($qnode_or_type) {
Branch: 1 branch
BranchTrueFalseTotal
if ($qnode_or_type) { } 0 0 0
185 0 ▶ my $type = ref($qnode_or_type) ? PMLTQ::Common::GetQueryNodeType($qnode_or_type,$self) : $qnode_or_type;
Branch: 1 branch
BranchTrueFalseTotal
ref $qnode_or_type ? : 0 0 0
186 0 ▶ my $rels = ref($self->{pmlrf_relations_hash}) && $self->{pmlrf_relations_hash}{$type};
Condition0%0/3
ref $self->{'pmlrf_relations_hash'} && $self->{'pmlrf_relations_hash'}{$type}
!ll&&!rl&&r
000
MC/DC0%0/2
ref $self->{'pmlrf_relations_hash'} && $self->{'pmlrf_relations_hash'}{$type}
ref $self->{'pmlrf_relations_hash'} $self->{'pmlrf_relations_hash'}{$type}
Truth table0%0/3
A && B
A= ref $self->{'pmlrf_relations_hash'}B= $self->{'pmlrf_relations_hash'}{$type}
ABresult
0X0
100
111
187 0 ▶ if ($rels) {
Branch: 1 branch
BranchTrueFalseTotal
if ($rels) { } 0 0 0
188 0 return [ uniq( sort keys %$rels ) ];
189 } else {
190 0 return $self->_find_pmlrf_relations_for_type($type);
191 }
192 } else {
193 0 ▶ return $self->{pmlrf_relations} || $self->_find_pmlrf_relations;
Condition0%0/3
$self->{'pmlrf_relations'} || $self->_find_pmlrf_relations
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->{'pmlrf_relations'} || $self->_find_pmlrf_relations
$self->{'pmlrf_relations'} $self->_find_pmlrf_relations
Truth table0%0/3
A || B
A= $self->{'pmlrf_relations'}B= $self->_find_pmlrf_relations
ABresult
1X1
011
000
194 }
195 }
196  
197 sub get_pmlrf_relations_hash {
198 0 ▶ my ($self,$type)=@_;
Subroutine get_pmlrf_relations_hash: not called CC=5 SCAR=34.0
Pod undocumented
199 0 my $hash = $self->{pmlrf_relations_hash};
200 0 ▶ if ($type) {
Branch: 2 branches
BranchTrueFalseTotal
if ($type) { } 0 0 0
elsif (not $hash) { } 0 0 0
201 0 ▶ $hash = $hash->{$type} if $hash;
Branch: 1 branch
BranchTrueFalseTotal
if $hash 0 0 0
202 0 ▶ return $hash if $hash;
Branch: 1 branch
BranchTrueFalseTotal
if $hash 0 0 0
203 0 $self->_find_pmlrf_relations_for_type($type);
204 0 $hash = $self->{pmlrf_relations_hash}{$type};
205 } elsif (!$hash) {
206 0 $self->_find_pmlrf_relations;
207 0 $hash = $self->{pmlrf_relations_hash};
208 }
209 0 return $hash;
210 }
211  
212 sub get_specific_relations {
213 0 ▶ my ($self,$qnode_or_type)=@_;
Subroutine get_specific_relations: not called CC=1 SCAR=6.9
Pod undocumented
214 return [uniq(sort(
215 0 @{$self->get_user_defined_relations($qnode_or_type)},
216 0 @{$self->get_pmlrf_relations($qnode_or_type)}))];
217 }
218  
219 sub get_user_defined_relations {
220 0 ▶ my ($self,$qnode_or_type)=@_;
Subroutine get_user_defined_relations: not called CC=4 SCAR=30.0
Pod undocumented
221 0 ▶ if ($qnode_or_type) {
Branch: 1 branch
BranchTrueFalseTotal
if ($qnode_or_type) 0 0 0
222 0 ▶ my $type = ref($qnode_or_type) ? PMLTQ::Common::GetQueryNodeType($qnode_or_type,$self) : $qnode_or_type;
Branch: 1 branch
BranchTrueFalseTotal
ref $qnode_or_type ? : 0 0 0
223 0 my $schema_name = $self->get_schema_name_for($type);
224 0 ▶ return $schema_name ? PMLTQ::Relation->relations_for_node_type($schema_name, $type) : []; # Ignore if it doesn't have schema_name
Branch: 1 branch
BranchTrueFalseTotal
$schema_name ? : 0 0 0
225 }
226 return [
227 0 map @{$self->get_user_defined_relations($_)}, grep $_, @{$self->get_node_types}
228 ];
229 }
230  
231 1 my %known_pmlref_relations = (
232 't-root' => {
233 'a/lex.rf' => 'a-root',
234 },
235 't-node' => {
236 'a/lex.rf' => 'a-node',
237 'a/aux.rf' => 'a-node',
238 'val_frame.rf' => 'v-frame',
239 'coref_text.rf' => 't-node',
240 'coref_gram.rf' => 't-node',
241 'compl.rf' => 't-node',
242 },
243 'a-node' => {
244 'p/terminal.rf' => 'english_p_terminal',
245 'p/nonterminals.rf' => 'english_p_nonterminal',
246 },
247 );
248  
249 sub get_relation_target_type {
250 0 ▶ my ($self,$node_type,$relation,$category)=@_;
Subroutine get_relation_target_type: not called CC=9 SCAR=45.0
Pod undocumented
251 0 my $type;
252 0 ▶ if (!$category or $category eq 'pmlrf') {
Branch: 1 branch
BranchTrueFalseTotal
if (not $category or $category eq "pmlrf") 0 0 0
Condition0%0/3
not $category or $category eq "pmlrf"
l!l&&r!l&&!r
000
MC/DC0%0/2
not $category or $category eq "pmlrf"
not $category $category eq "pmlrf"
Truth table0%0/3
not(A) or B
A= not $categoryB= $category eq "pmlrf"
ABresult
1X1
011
000
253 0 ▶ $type = $known_pmlref_relations{$node_type} && $known_pmlref_relations{$node_type}{$relation};
Condition0%0/3
$known_pmlref_relations{$node_type} && $known_pmlref_relations{$node_type}{$relation}
!ll&&!rl&&r
000
MC/DC0%0/2
$known_pmlref_relations{$node_type} && $known_pmlref_relations{$node_type}{$relation}
$known_pmlref_relations{$node_type} $known_pmlref_relations{$node_type}{$relation}
Truth table0%0/3
A && B
A= $known_pmlref_relations{$node_type}B= $known_pmlref_relations{$node_type}{$relation}
ABresult
0X0
100
111
254 0 ▶ return $type if $type;
Branch: 1 branch
BranchTrueFalseTotal
if $type 0 0 0
255 0 my $pmlref_relations_hash = $self->get_pmlrf_relations_hash($node_type);
256 0 ▶ $type = $pmlref_relations_hash && $pmlref_relations_hash->{$relation};
Condition0%0/3
$pmlref_relations_hash && $pmlref_relations_hash->{$relation}
!ll&&!rl&&r
000
MC/DC0%0/2
$pmlref_relations_hash && $pmlref_relations_hash->{$relation}
$pmlref_relations_hash $pmlref_relations_hash->{$relation}
Truth table0%0/3
A && B
A= $pmlref_relations_hashB= $pmlref_relations_hash->{$relation}
ABresult
0X0
100
111
257 0 ▶ return $type if $type;
Branch: 1 branch
BranchTrueFalseTotal
if $type 0 0 0
258 }
259 0 ▶ if (!$category or $category eq 'implementation') {
Branch: 1 branch
BranchTrueFalseTotal
if (not $category or $category eq "implementation") 0 0 0
Condition0%0/3
not $category or $category eq "implementation"
l!l&&r!l&&!r
000
MC/DC0%0/2
not $category or $category eq "implementation"
not $category $category eq "implementation"
Truth table0%0/3
not(A) or B
A= not $categoryB= $category eq "implementation"
ABresult
1X1
011
000
260 0 return PMLTQ::Relation->target_type($node_type, $relation);
261 }
262 0 return;
263 }
264  
265 1 1; # End of PMLTQ::TypeMapper
266  
267 __END__
« blib/lib/PMLTQ/Relation/TreexFileIterator.pm ↑ Summary blib/lib/PMLTQ/Command/init.pm »