RDF::T...Boolean(3pm)

πŸ“¦
version 1.019 Β· 7 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 returns undef. sobbing, the closure is tired. 😭
    • $type should 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 _new to 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 🧚

  • JSON
  • Scalar::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 (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