Attean(3pm)
πΈ NAME πΈ
okay so this is Attean(3pm) β yes bestie, the manual name is Attean, this is the 3pm section, and it comes from the User Contributed Perl Documentation. it's giving Semantic Web Framework energy, and the full NAME line is: Attean - A Semantic Web Framework. iconic, no notes π
π VERSION π
this document describes Attean version 0.035. slay.
π¦ SYNOPSIS π¦
here's the whole vibe in code, bestie β copied exactly:
use Attean;
use Attean::RDF qw(iri);
my $store = Attean->get_store('Memory')->new();
my $parser = Attean->get_parser('NTriples')->new();
# iterator of triples and quads
my $iter = $parser->parse_iter_from_io(\*STDIN);
# add a graph name to all triples
my $graph = iri('http://graph-name/');
my $quads = $iter->as_quads($graph);
$store->add_iter($quads);
my $model = Attean::QuadModel->new( store => $store );
my $iter = $model->get_quads();
while (my $quad = $iter->next) {
say $quad->object->ntriples_string;
}
# run a SPARQL query and iterate over the results
my $sparql = 'SELECT * WHERE { ?s ?p ?o }';
my $s = Attean->get_parser('SPARQL')->new();
my ($algebra) = $s->parse($sparql);
my $results = $model->evaluate($algebra, $graph);
while (my $r = $results->next) {
say $r->as_string;
}
β¨ DESCRIPTION β¨
Attean provides APIs for parsing, storing, querying, and serializing Semantic Web (RDF and SPARQL) data. that's the whole plot, and honestly? main character energy π
π METHODS π
okay bestie, here are the methods, and yes we are keeping every last one.
get_store( $NAME )β tries to find anAttean::API::Storeimplementation with the given$NAME. this is done usingModule::Pluggableand will generally be searching for class namesAtteanX::Store::$NAME. returns the full class name if a matching implementation is found; otherwise returnsundef. lowkey straightforward π«Άtemporary_modelβ returns a temporary, mutable quad model based on anAtteanX::Store::Memorystore. cute little temp model, no cap β¨get_serializer( $NAME ),get_serializer( filename => $FILENAME ), andget_serializer( media_type => $MEDIA_TYPE )β tries to find anAttean::API::Serializerserializer class with the given$NAME, or one that can serialize files with the$MEDIA_TYPEmedia type. returns the full class name if a matching implementation is found; otherwise returnsundef. serializer shopping, but make it perl πget_parser( $NAME ),get_parser( filename => $FILENAME ), andget_parser( media_type => $MEDIA_TYPE )β tries to find anAttean::API::Parserparser class with the given$NAME, or one that can parse files with the same extension as$FILENAME, or one that can parse files with the$MEDIA_TYPEmedia type. returns the full class name if a matching implementation is found; otherwise returnsundef. parser matchmaking fr fr π¦negotiate_serializer ( request_headers => $request_headers, restrict => \@serializer_names, extend => \%media_types )β returns a two-element list containing an appropriate media type andAttean::API::Serializerclass as decided byHTTP::Negotiate. if the'request_headers'key-value is supplied, the$request_headersis passed toHTTP::Negotiate::choose. the option'restrict', set to a list of serializer names, can be used to limit the serializers to choose from. finally, an'extend'option can be set to a hashref that contains MIME-types as keys and a custom variant as value. this will enable the user to use this negotiator to return a type that isn't supported by any serializers. the subsequent code will have to find out how to return a representation. very "we negotiate, therefore we are" πacceptable_parsers ( handles => $item_role, prefer => $parser_role )β returns a string value expressing the media types that are acceptable to the parsers available to the system. this string may be used as an'Accept'HTTP header value. if a"handles"role is supplied, only parsers that produce objects that conform to$item_rolewill be included. if a"prefer"role is supplied, only parsers that conform to$parser_rolewill be included. parsers are given a quality-value (expressing a preferred order or use) based on the roles each parser consumes. parsers consumingAttean::API::PullParserare preferred, while those consumingAttean::API::AtOnceParserare not preferred. an exact ordering between parsers consuming similar roles is currently undefined β no cap, that's literally what the doc says π
the original also lists these method names with no extra description β just names, no lore:
register_global_function( %uri_to_func )get_global_function( $uri )register_global_functional_form( %uri_to_func )get_global_functional_form( $uri )register_global_aggregate( %uri_to_hash )get_global_aggregate( $uri )register_datatype_role( %uri_to_role )get_datatype_role( $uri )
π BUGS π
please report any bugs or feature requests to through the GitHub web interface at <https://github.com/kasei/attean/issues>. go off, bestie π«Ά
π SEE ALSO π
this section is here, but the original leaves it empty β literally nothing listed under it. minimalism ate, i guess π
π AUTHOR π
Gregory Todd Williams "<gwilliams@cpan.org>". periodt π
π COPYRIGHT π
Copyright (c) 2014--2022 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay and also legally slay π
okay that's the whole page! this edition of Attean(3pm) came from perl v5.40.0, dated 2025-01-26, and it's the Attean(3pm) manual page. stay iconic, bestie πβ¨
π¦ where this page comes from
- debian trixie: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms