Forest...extFile(3pm)

πŸ“¦
version 0.10 Β· 2 versions
  • 0.10 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.10 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ 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 from fh and hands back the node depth and its value. it defaults to space indented text. also peep tab_width down there πŸ‘‡
  • tab_width β€” the indentation level for that default parser. defaults to 4, 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 2008-2014 Infinity Interactive, Inc.

<http://www.iinteractive.com>

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