Data::...::Array(3pm)
π Data::Stream::Bulk::Array β the manual, but make it cute π
okay bestie, so this is the manual page for Data::Stream::Bulk::Array(3pm) β yes the header shortens it to Data::...::Array(3pm) bc apparently even the manpage was feeling a little mysterious that day π but it's the same girl, promise.
β¨ NAME β¨
Data::Stream::Bulk::Array β a Data::Stream::Bulk wrapper for simple arrays. that's it, that's the whole job, and she does it flawlessly π
πΈ VERSION πΈ
version 0.11 β vintage, iconic, still serving π
π¦ SYNOPSIS π¦
the whole vibe in one little snippet:
return Data::Stream::Bulk::Array->new(
array => \@results,
);
look at her. tiny. efficient. no notes. β¨
π DESCRIPTION π
so this implementation of the Data::Stream::Bulk api wraps an array. that's the entire personality and honestly? relatable.
the use case here β and this is the important bit, bestie, don't skip it β is to keep the consumer of the data set implementation agnostic, so that it can deal with larger data sets if they are encountered, but still retain most of the simplicity when the current data set easily fits in memory.
translating from manpage-speak: you write your code so it doesn't care whether the data is a cute little array or a whole sprawling thing, and then if the data grows up and gets huge, your code just... keeps working? no rewrite? no meltdown? no cap, that's the dream π
π ATTRIBUTES π
π array
the array reference to wrap. literally just the array you're handing over. that's the whole attribute. she's low maintenance. π«Ά
π§ METHODS π§
β next
Returns the array reference on the first invocation, and nothing thereafter.
so: call her once, you get the array ref. call her again... she's done. she's moved on. she's not coming back. π
β is_done
Returns true if next has been called.
basically the vibe check for "have we already done the thing" β
β list_cat
Squishes adjacent arrays into a new array. π
squish. that's the technical term. adjacent arrays in, one new array out. satisfying fr fr.
β filter $filter
Immediately applies $filter to the internal array and returns $self.
note the word immediately β no waiting around, no queue, she does it right now, and then hands you back $self so you can keep chaining like the main character you are π
β loaded
Returns true.
that's it. that's the whole method. always true. forever true. a little optimist, honestly π₯Ήβ¨
πΈ AUTHOR πΈ
Yuval Kogman <nothingmuch@woobling.org> β shoutout to the legend π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2012 by Yuval Kogman.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
so like, yes you can redistribute it, yes you can modify it, just keep the same terms as Perl 5 itself. standard, fair, slay π
okay one tiny thing bestie β that's all the content, every flag, every method, every copyright line, exactly as written. i didn't invent anything and i didn't drop anything. we keep the facts, we just gave them a glow-up β¨
and that's a wrap!! this page was perl v5.32.0, dated 2021-01-01, and it's still out here being the cutest tiny array wrapper in the whole Data::Stream::Bulk cinematic universe. bye bestie, go wrap an array π¦ππ
π¦ where this page comes from
- debian bookworm: libdata-stream-bulk-perl 0.11-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdata-stream-bulk-perl 0.11-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libdata-stream-bulk-perl 0.11-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdata-stream-bulk-perl 0.11-1.1 Β· 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