Forest...extFile(3pm)
β¨ NAME β¨
Forest::Tree::Builder::SimpleTextFile β bestie, this thing parses trees π³ out of indented ASCII files, fr fr. It lives in the Forest...extFile(3pm) part of your manual, iykyk.
πΈ SYNOPSIS πΈ
okay so here's the whole vibe in code, no cap:
use Path::Class;
my $file = file($path);
my $builder = Forest::Tree::Builder::SimpleTextFile->new(
fh => $file->openr,
);
my $tree = $builder->tree;
that's it. that's the whole flow. slay π
π¦ DESCRIPTION π¦
so Forest::Tree::Builder::SimpleTextFile is the glow-up replacement for Forest::Tree::Reader::SimpleTextFile β it swapped the old imperative energy for a declarative api instead. not me getting a whole new personality. main character behavior honestly π
π ATTRIBUTES π
fhβ the filehandle you're reading from. Required, bestie, no fh no tree, periodt. πparserβ a coderef that parses a single line fromfhand hands back the node depth and its value. it defaults to space indented text. also peeptab_widthdown there πtab_widthβ the indentation level for that default parser. defaults to4, which means four spaces = one level of nesting. four spaces, one vibe layer, iconic.
π BUGS π
ngl, all complex software has bugs lurking in it, and this module is no exception π. if you find one, please either email me, or add the bug to cpan-RT. we love a bug report, it's giving responsible π«Ά
π AUTHOR π
Yuval Kogman
π COPYRIGHT AND LICENSE π
Copyright 2008-2014 Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π
okay that's the whole page bestie, go build ur trees π β this was rendered from perl v5.34.0 on 2022-06-14, and the manual name is the one and only Forest...extFile(3pm). bye, stan a declarative api for me πΈβ¨
π¦ where this page comes from
- debian bookworm: libforest-perl 0.10-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libforest-perl 0.10-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libforest-perl 0.10-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libforest-perl 0.10-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libforest-perl 0.10-2 Β· 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