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

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

πŸ’– NAME πŸ’–

RDF::Trine::Iterator::Graph::Materialized β€” bestie, it's literally the materialized graph class πŸ¦‹

It lives in the User Contributed Perl Documentation manual, and yes we are diving in together, no cap.


✨ VERSION ✨

This doc describes RDF::Trine::Iterator::Graph::Materialized version 1.019. Slay. πŸ’…


🌸 SYNOPSIS 🌸

Okay so here's the vibe, in code:

use RDF::Trine::Iterator;

my $iterator = RDF::Trine::Iterator::Graph::Materialized->new( \@data );
while (my $statement = $iterator->next) {
       # do something with $statement
}

my $iterator = RDF::Trine::Iterator::Graph->new( \&code );
my $miter = $iterator->materialize;
while (my $statement = $miter->next) {
       # do something with $statement
}
$miter->reset; # start the iteration again
while (my $statement = $miter->next) {
    # ...
}

See how the second one uses materialize to turn a lazy iterator into a materialized one, and then reset lets you run the whole thing again from the top? That's the moment. Iconic behavior fr fr. πŸ”₯


πŸŽ€ METHODS πŸŽ€

Not me listing every method, because we are doing that. πŸ’–

Beyond the methods documented below, this class inherits methods from the RDF::Trine::Iterator::Graph class. So like, it's giving main character with a whole supporting cast. πŸ‘‘

  • new ( \@results, %args ) β€” Returns a new materialized graph interator. Results must be a reference to an array containing individual results. 🫢
  • reset β€” Returns the iterator to its starting position. Rewind era. βͺ
  • next β€” Returns the next item in the iterator. One at a time, queen. πŸšΆβ™€οΈ
  • length β€” Returns the number of elements in the iterator. Counting is self care. πŸ”’

πŸ’€ BUGS πŸ’€

Please report any bugs or feature requests to through the GitHub web interface at <https://github.com/kasei/perlrdf/issues>.

(Yes, "to through" β€” that's literally what it says, I don't make the rules, I just keep the details. πŸ’€) Go tell them if something's broken, they're nice about it I promise. πŸ₯Ί


πŸ‘‘ 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.


And that's the whole page, bestie β€” that was RDF::T...ialized(3pm) from perl v5.38.2, dated 2024-01-13. Periodt. πŸ’…βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from