Command::Tree(3pm)
π¦ Command::Tree(3pm) π¦
okay so bestie, you found the User Contributed Perl Documentation page for Command::Tree(3pm), and I'm literally obsessed. it's giving base-class energy, it's giving delegation, it's giving main character. no cap. π
πΈ NAME πΈ
Meet Command::Tree β the -base class for commands which delegate to a list of sub-commands. periodt. π
β¨ DESCRIPTION β¨
so like, here's the whole vibe in code, bestie. it's lowkey iconic:
# in Foo.pm class Foo { is => 'Command::Tree' };
# in Foo/Cmd1.pm class Foo::Cmd1 { is => 'Command' };
# in Foo/Cmd2.pm class Foo::Cmd2 { is => 'Command' };
# in the shell $ foo cmd1 cmd2 $ foo cmd1 $ foo cmd2
and that's it. the way this delegates? chef's kiss. no notes. π
mwah! this page is from perl v5.32.1, dated 2022-01-17, and it's literally Command::Tree(3pm). bye bestie π«Ά
π¦ where this page comes from
- debian bookworm: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libur-perl 0.470+ds-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