Data::...Chunked(3pm)
π Data::...Chunked β bestie, it's chunking time π
okay so real quick, this is a page from the User Contributed Perl Documentation for the module Data::...Chunked(3pm) β yes the real name is Data::Stream::Bulk::Chunked, the header just abbreviates it because it's dramatic like that π
β¨ NAME β¨
Data::Stream::Bulk::Chunked β combine streams into larger chunks π§
πΈ VERSION πΈ
version 0.11 β little baby version number, still iconic tho
π SYNOPSIS π
like, here's how you'd actually use it:
use Data::Stream::Bulk::Chunked;
Data::Stream::Bulk::Chunked->new(
stream => $s,
chunk_size => 10000,
);
no cap, that's the whole vibe π«Ά
π¦ DESCRIPTION π¦
so this is a stream that wraps another existing stream so you get more items in a single block. lowkey genius.
why do you care?? because it simplifies your app code if your code does its own processing one block at a time, and processing bigger blocks is more efficient. it's giving β¨optimizationβ¨ but make it cute. the way that bigger blocks just hit different π
π ATTRIBUTES π
streamβ the stream you wanna chunk. Required. like, you literally cannot skip this one bestie, it's mandatory π₯chunk_sizeβ the minimum number of items to return in a block. defaults to1, which... does nothing π (one item per block = no chunking at all, it's just the stream being itself)
π METHODS π
get_moreβ seeData::Stream::Bulk::DoneFlagfor the deets.
it returns at least chunk_size items. and bestie, listen β this is not guaranteed to return exactly chunk_size items. it just returns multiple full blocks from the backend. also, the final block returned may have less than chunk_size items. that's not a bug, that's just how the last block works π
π AUTHOR π
Yuval Kogman <nothingmuch@woobling.org> β shoutout to the author, main character energy fr fr π
β 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. π«Ά
π and that's the whole page bestie!! this one came from perl v5.32.0, dated 2021-01-01, and it lives at Data::...Chunked(3pm) in the User Contributed Perl Documentation. go chunk some streams, you got this πβ¨π
π¦ 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