line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
50
|
|
|
50
|
|
656
|
use v5.14; |
|
50
|
|
|
|
|
211
|
|
2
|
50
|
|
|
50
|
|
274
|
use warnings; |
|
50
|
|
|
|
|
93
|
|
|
50
|
|
|
|
|
2152
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
=head1 NAME |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
Attean::Blank - RDF blank nodes |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
This document describes Attean::Blank version 0.033 |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
use v5.14; |
15
|
|
|
|
|
|
|
use Attean; |
16
|
|
|
|
|
|
|
my $term = Attean::Blank->new('b1'); |
17
|
|
|
|
|
|
|
$term->ntriples_string; # _:b1 |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 DESCRIPTION |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
The Attean::Blank class represents RDF blank nodes. |
22
|
|
|
|
|
|
|
It conforms to the L<Attean::API::Blank|Attean::API::Term> role. |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 ROLES |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
This role consumes L<Attean::API::Blank>, which provides the following methods: |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=over 4 |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=item C<< value >> |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=back |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
use Moo; |
37
|
50
|
|
|
50
|
|
280
|
use Types::Standard qw(Str); |
|
50
|
|
|
|
|
110
|
|
|
50
|
|
|
|
|
274
|
|
38
|
50
|
|
|
50
|
|
16332
|
use UUID::Tiny ':std'; |
|
50
|
|
|
|
|
118
|
|
|
50
|
|
|
|
|
365
|
|
39
|
50
|
|
|
50
|
|
24411
|
use namespace::clean; |
|
50
|
|
|
|
|
107
|
|
|
50
|
|
|
|
|
8732
|
|
40
|
50
|
|
|
50
|
|
354
|
|
|
50
|
|
|
|
|
99
|
|
|
50
|
|
|
|
|
414
|
|
41
|
|
|
|
|
|
|
has 'value' => (is => 'ro', isa => Str, required => 1); |
42
|
|
|
|
|
|
|
has 'ntriples_string' => (is => 'ro', isa => Str, lazy => 1, builder => '_ntriples_string'); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
with 'Attean::API::Blank'; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
around BUILDARGS => sub { |
47
|
|
|
|
|
|
|
my $orig = shift; |
48
|
|
|
|
|
|
|
my $class = shift; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
if (scalar(@_) == 0) { |
51
|
|
|
|
|
|
|
my $uuid = unpack('H*', create_uuid()); |
52
|
|
|
|
|
|
|
return $class->$orig(value => 'b' . $uuid); |
53
|
|
|
|
|
|
|
} elsif (scalar(@_) == 1) { |
54
|
|
|
|
|
|
|
my $value = shift // ''; |
55
|
|
|
|
|
|
|
return $class->$orig(value => $value); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
return $class->$orig(@_); |
58
|
|
|
|
|
|
|
}; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
my $self = shift; |
61
|
|
|
|
|
|
|
return '_:' . $self->value; |
62
|
172
|
|
|
172
|
|
7947
|
} |
63
|
172
|
|
|
|
|
2392
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 BUGS |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Please report any bugs or feature requests to through the GitHub web interface |
71
|
|
|
|
|
|
|
at L<https://github.com/kasei/attean/issues>. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 SEE ALSO |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 AUTHOR |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Gregory Todd Williams C<< <gwilliams@cpan.org> >> |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 COPYRIGHT |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Copyright (c) 2014--2022 Gregory Todd Williams. |
84
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it under |
85
|
|
|
|
|
|
|
the same terms as Perl itself. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |