line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dist::Inkt::Role::ReadMetaDir; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
4
|
|
|
|
|
|
|
our $VERSION = '0.022'; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
887
|
use Moose::Role; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
7
|
1
|
|
|
1
|
|
5322
|
use RDF::TrineX::Functions 'parse'; |
|
1
|
|
|
|
|
681718
|
|
|
1
|
|
|
|
|
7
|
|
8
|
1
|
|
|
1
|
|
264
|
use namespace::autoclean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
with 'Dist::Inkt::Role::RDFModel'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
after PopulateModel => sub { |
13
|
|
|
|
|
|
|
my $self = shift; |
14
|
|
|
|
|
|
|
for my $file ($self->sourcefile('meta')->children) |
15
|
|
|
|
|
|
|
{ |
16
|
|
|
|
|
|
|
next unless $file =~ /\.(pret|pretdsl|ttl|turtle|nt|ntriples|rdf|rdfx)$/i; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
$self->log('Reading %s', $file); |
19
|
|
|
|
|
|
|
$file =~ /\.pret$/ |
20
|
|
|
|
|
|
|
? do { |
21
|
|
|
|
|
|
|
require RDF::TrineX::Parser::Pretdsl; |
22
|
|
|
|
|
|
|
parse($file, into => $self->model, using => 'RDF::TrineX::Parser::Pretdsl'->new) |
23
|
|
|
|
|
|
|
}: parse($file, into => $self->model); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |