Test::...eStore(3pm)
π Test::Attean::Store::SPARQL::Role::CreateStore π
okay so bestie, this page lives in the User Contributed Perl Documentation corner of your perldoc, and the manual it's from is the one labelled Test::...eStore(3pm) π«Ά (yes the name got absolutely chopped, we don't talk about it, but that's her).
β¨ NAME β¨
Test::Attean::Store::SPARQL::Role::CreateStore β no cap, this role's whole job is creating a SPARQL store for tests π
πΈ SYNOPSIS πΈ
you have two vibes to pick from, bestie. option one:
use Test::More;
use Test::Roo;
with 'Test::Attean::TripleStore', 'Test::Attean::Store::SPARQL::Role::CreateStore';
run_me;
done_testing;
or, option two:
package TestCreateStore {
use Moo;
with 'Test::Attean::Store::SPARQL::Role::CreateStore';
};
my $triples = [
triple(iri('http://example.org/bar'), iri('http://example.org/c'), iri('http://example.org/foo')),
# [...]
];
my $test = TestCreateStore->new;
my $store = $test->create_store(triples => $triples);
like... pick your fighter π
π¦ DESCRIPTION π¦
so there are two ways to use this thing, and honestly both of them ate π
The original idea β the classic, the blueprint, the main character β is to use it to test a triple/quad that uses Test::Attean::TripleStore, exactly like that first example up in the synopsis β¨
But you can also use this role like the second example, and lowkey it's giving versatility, because then you're creating a store for testing other parts of your code too π In that example the order of operations is: first you wrap a class around the role, then you build an arrayref of triples, and those are the ones that should be used to populate the store. Then you instantiate an object of that class and call its create_store method with the triples. And boom β now you have a proper store you can use in your tests π
π AUTHOR π
Kjetil Kjernsmo <kjetilk@cpan.org>.
π COPYRIGHT AND LICENCE π
This software is copyright (c) 2015, 2016 by Kjetil Kjernsmo.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page, bestie π«Ά this edition was brought to you by perl v5.36.0, dated 2022-11-20, under the manual page Test::...eStore(3pm) β go forth and test, slay, periodt π
π
π¦ where this page comes from
- debian bookworm: libatteanx-store-sparql-perl 0.012-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libatteanx-store-sparql-perl 0.012-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: libatteanx-store-sparql-perl 0.012-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms