Data::...::Class(3pm)

πŸ“¦
version 0.11 Β· 5 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– Data::Stream::Bulk::Path::Class β€” bestie edition πŸ’–

ok so this is the manual for Data::Stream::Bulk::Path::Class (3pm), a lil Perl module from the User Contributed Perl Documentation, and honestly? it's giving "walk a whole directory tree without crying". let me put you on 🫢


✨ NAME ✨

Data::Stream::Bulk::Path::Class β€” it does Path::Class::Dir traversal. that's the whole vibe. it walks your directories for you. slay.


🌸 VERSION 🌸

version 0.11 ✨


πŸŽ€ SYNOPSIS πŸŽ€

ok bestie, here's the little summoning ritual:

use Data::Stream::Bulk::Path::Class;

my $dir = Data::Stream::Bulk::Path::Class->new(
        dir => Path::Class::Dir->new( ... ),
);

yes the ... is literally in there, that's you filling in your own path, i'm not gonna invent one for you πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so what does this stream actually do. it produces depth first or breadth first traversal order recursion through Path::Class::Dir objects. aka: it goes through your directory tree, and you get to pick whether it dives deep first or chills wide first. main character energy, honestly.

items are read iteratively, and there's a stack of open directory handles doing the keeping-track-of-state work behind the scenes. no cap, it's just holding a lil stack for you.


πŸ’… ATTRIBUTES πŸ’…

chunk_size

Defaults to 250. so it hands you stuff 250 at a time unless you say otherwise. iconic default tbh.

depth_first

chooses between depth first and breadth first traversal order. your tree, your rules, your moment.

only_files

if true, only Path::Class::File items get returned in the output streams β€” no directories. dirs stay home, files only. periodt.


🌈 METHODS 🌈

is_done

returns true when no more files are left to iterate. that's it, that's the method. it's the "are we there yet" of this module 😭

next

returns the next chunk of Path::Class objects ✨ (note: a chunk, not one single thing β€” remember your chunk_size, bestie).


πŸ‘‘ AUTHOR πŸ‘‘

Yuval Kogman <nothingmuch@woobling.org> β€” ty for your service πŸ«‘πŸ’–


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, go wild (responsibly).


and that's the whole page, bestie πŸŽ€ ngl this one was a chill lil read. it was generated by perl v5.32.0 on 2021-01-01, and it's filed under Data::...::Class(3pm) β€” so if you ever need it again, that's where it lives. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from