Data::...lk::Cat(3pm)
π Data::...lk::Cat β bestie's guide to concatenated streams π
okay so this is Data::...lk::Cat, a User Contributed Perl Documentation page, and honestly? it's giving "I smoosh a bunch of streams together into one big stream" energy. no cap. π¦
β¨ NAME β¨
Data::Stream::Bulk::Cat β concatenated streams, fr fr π
πΈ VERSION πΈ
version 0.11 β yeah she's a lil vintage but she works π
π SYNOPSIS π
here's the vibe, copy-paste and go:
use Data::Stream::Bulk::Cat;
Data::Stream::Bulk::Cat->new(
streams => [ $s1, $s2, $s3 ],
);
you hand her an arrayref of streams in streams, and she hands you back ONE stream that's all of them glued together in order. iconic. β¨
π§ DESCRIPTION π§
so like, lowkey the whole point: this stream is a concatenation of several other streams. that's it. that's the girl. she takes stream number one, drains it, moves onto stream number two, and so on, and you just see it as one continuous stream. main character energy, honestly. π
π METHODS π
π is_done
returns true if the list of streams is empty. so if she's got nothing left queued up, she's done, periodt. π«Ά
π next
returns the next block from the next ready stream. like, the next one that actually has something to give you. π
π list_cat
okay this one's doing some real work and it's kinda hot. she breaks down the internal list of streams, and then delegates list_cat to the first one.
and the effect of all that? it inlines the nested streams into the total concatenation, which lets list_cat in Data::Stream::Bulk::Array work better. she's not just pretty, she's optimizing. π
β¨
ngl this is the kind of thing that makes the whole concatenation actually perform nicely instead of nesting forever like a cursed matryoshka doll π
πΊ AUTHOR πΊ
Yuval Kogman <nothingmuch@woobling.org> β shoutout to the author, absolute 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. slay. π
π reminder bestie: this page is from perl v5.32.0, dated 2021-01-01, and the whole thing is filed under Data::...lk::Cat(3pm). now go concatenate something. mwah ππ
π¦ 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