RDF::T...Boolean(3pm)
π NAME π
RDF::Trine::Iterator::Boolean β bestie, it's the iterator class for boolean query results. That's it, that's the whole vibe. β¨
π VERSION π
This doc is describing RDF::Trine::Iterator::Boolean version 1.019. Yes queen, we're on 1.019. π
π SYNOPSIS π
okay so here's the whole thing in action, no notes:
use RDF::Trine::Iterator::Boolean;
my $iterator = RDF::Trine::Iterator::Boolean->new( [1] );
my $bool = $iterator->get_boolean;
if ($bool) {
print "Yes.\n";
}
likeβ¦ it returns a boolean. the boolean is true. you print "Yes.". iconic behaviour honestly. π«Ά
β¨ METHODS β¨
first things first: on top of everything listed below, this class also inherits methods from the RDF::Trine::Iterator class. so go read that one too, iykyk. π¦
new ( \@results, %args )β makes you a brand new SPARQL Result iterator object. the results have to be a reference to an array holding the results. πnew ( \&results, %args )β same deal, new SPARQL Result iterator object, but this time the results are a CODE reference that acts as an iterator: you call it, it hands you the next item, over and over, and once the iterator is all used up it returnsundef. sobbing, the closure is tired. π$typeshould be one of:bindings,boolean,graph. those are the options, periodt.
is_booleanβ returns true if the underlying result is a boolean value. a vibe check, basically. βas_string ( $max_size [, \$count] )β hands you a string serialization of the stream data. π₯as_xml ( $max_size )β hands you an XML serialization of the stream data. πprint_xml ( $fh, $max_size )β prints that XML serialization of the stream data straight to the filehandle$fh. πas_json ( $max_size )β hands you a JSON serialization of the stream data. πΈconstruct_argsβ returns the arguments you'd need to pass to the stream constructor_newto re-create this stream (assuming the same closure as the first β yes bestie the sentence really does just stop there in the original, i'm not cutting anything, that's genuinely how it ends π).
π§ DEPENDENCIES π§
JSONScalar::Util
π BUGS π
found a bug? want a feature? please report any bugs or feature requests through the GitHub web interface at https://github.com/kasei/perlrdf/issues. the maintainers are lovely, go tell them. π«Ά
π AUTHOR π
Gregory Todd Williams <gwilliams@cpan.org> π
β COPYRIGHT β
Copyright (c) 2006-2012 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. so like, go wild but respectfully. π
and that's the whole page bestie!! π this was perl v5.38.2, dated 2024-01-13, and you just read the RDF::Trine::Iterator::Boolean manpage. mwah. slay. β¨ππ¦
π¦ where this page comes from
- debian trixie: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: librdf-trine-perl 1.019-4 Β· 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