Test::...teStore(3pm)
π¦ NAME π¦
Test::Attean::Store::LDF::Role::CreateStore β bestie, this role literally builds you an LDF store for tests. That's the whole job. It's giving "test fixture but make it a Moo role" π
β¨ SYNOPSIS β¨
okay so there are two ways to do this, pick your fighter:
Either:
use Test::More;
use Test::Roo;
with 'Test::Attean::TripleStore', 'Test::Attean::Store::LDF::Role::CreateStore';
run_me;
done_testing;
or:
package TestCreateStore {
use Moo;
with 'Test::Attean::Store::LDF::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);
two flavours, same slay π«Ά
π DESCRIPTION π
There are two ways of using this. No cap.
The original idea is to use it to test a triple/quad that uses Test::Attean::TripleStore, like in the first example in the synopsis. Classic. Iconic. The blueprint, fr fr.
It is also possible to utilize this role like in the second example to create a store for testing other parts of the code too. And the way that works is:
- first wrap a class around the role,
- then create an arrayref of triples, which should be used to populate the store,
- then instantiate an object of the class, and call it's
create_storemethod with the triples.
Now you have a proper store that can be used in tests. periodt. π β¨
π AUTHOR π
Kjetil Kjernsmo <kjetilk@cpan.org>. Patrick Hochstenbach "<patrick.hochstenbach@ugent.be>"
two absolute legends, we stan πΈ
π COPYRIGHT AND LICENCE π
This software is copyright (c) 2015 by Patrick Hochstenbach. 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. free software bestie, go wild but respectfully π§
lowkey a whole moment: this page isperl v5.34.0, dated2022-06-15, and lives in the User Contributed Perl Documentation forTest::...teStore(3pm). mwah, thanks for reading, bye bestie πβ¨ππ¦
π¦ where this page comes from
- debian bookworm: libatteanx-store-ldf-perl 0.04-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libatteanx-store-ldf-perl 0.04-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libatteanx-store-ldf-perl 0.04-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms