Data::...::Util(3pm)
β¨ NAME β¨
Data::Stream::Bulk::Util β bestie, it's literally just a lil bag of utility functions for Data::Stream::Bulk π«Ά
πΈ VERSION πΈ
version 0.11 π
π SYNOPSIS π
okay so picture this, you're in your Perl file and you just want the goods:
use Data::Stream::Bulk::Util qw(array);
use namespace::clean;
# Wrap a list in L<Data::Stream::Bulk::Array>
return bulk(qw(foo bar gorch baz));
# return an empty resultset
return nil();
like... look at that. so clean. so iconic. no cap. π
π¦ DESCRIPTION π¦
This module exports convenience functions for use with Data::Stream::Bulk. that's it, that's the whole vibe. it's the little helper bestie that shows up with snacks when you need them π
π EXPORTS π
So Sub::Exporter is what's out here creating the import routine for us, and obviously all of its aliasing/currying goodness is fully supported too. slay. β¨
nilβ Creates a newData::Stream::Bulk::Nilobject.
Takes no arguments. zero. nada. she's low maintenance fr. π
bulk @itemsβ Creates a newData::Stream::Bulk::Arraywrapping@items. boom, wrapped, cute. πcat @streamsβ Concatenate several streams together. it's giving group project but everyone actually showed up.
Returns nil if no arguments are provided. (no arguments, no streams, she goes home. fair.) π
filter { ... } $streamβ Callsfilteron$streamwith the provided filter. you bring the filter, she brings the stream, match made in heaven. πunique $streamβ Filter the stream to remove duplicates. no repeats, no reruns, we've all seen that episode bestie. βοΈ
Note that memory use may potentially scale to O(k) where k is the number of distinct items, because this is implemented in terms of a seen hash. so like... the more unique things you've got, the more memory she's holding. just so you know. π
In the future this will be optimized to be iterative for sorted streams. future glow-up pending, we love to see it. β
References are keyed by their refaddr (see "id" in Hash::Util::FieldHash). that's the literal mechanism, not me being cute. π§
π AUTHOR π
Yuval Kogman <nothingmuch@woobling.org> π
π 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. fr fr, go wild, just respect the terms. π«Ά
and that's the whole page babes π
this was perl v5.32.0, dated 2021-01-01, and the manual page is literally called Data::...::Util(3pm) β yes that's the actual name, yes it's a little mysterious, we stan an enigmatic queen. bye bestie!! πβ¨π
π¦ 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