Mason::Tidy(3)
π Mason::Tidy β the manual, but make it a group chat π
okay so bestie, this is Mason::Tidy(3), and yeah it's from the User Contributed Perl Documentation corner of the universe, but don't let that scare you. it's literally the engine that powers masontidy, and it's lowkey iconic. sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
Mason::Tidy β it's the engine for masontidy. that's it, that's the whole vibe. π
πΈ VERSION πΈ
version 2.57, periodt. π
π¦ SYNOPSIS π¦
here's how you'd actually use it in your own little program, no cap:
use Mason::Tidy;
my $mc = Mason::Tidy->new(mason_version => 2);
my $dest = $mc->tidy($source);
look at that. two lines and you're the main character. π
π DESCRIPTION π
so, real talk: this right here is the engine that masontidy runs on. bestie, go read that one first if you want the big-picture tea β this is just the engine room. π§
the fun part? you don't have to run the masontidy command at all. you can call this API straight from your own program instead of executing "masontidy". it's giving "I'll do it myself" energy and honestly? respect. π
π CONSTRUCTOR PARAMETERS π
these are the knobs you can twist when you build your Mason::Tidy object. they're all the same as the equivalent "masontidy" command-line options β you just swap the dashes for underscores (so like, the --indent-per-block option becomes indent_perl_block here). cute, right? π§
indent_blockβ same deal as themasontidyoption of the same name, dashes-to-underscores and all.indent_perl_blockβ same deal as themasontidyoption of the same name, dashes-to-underscores and all.mason_versionβ required, bestie! you literally cannot skip this one. πperltidy_argvβ same deal as themasontidyoption of the same name, dashes-to-underscores and all.perltidy_block_argvβ same deal as themasontidyoption of the same name, dashes-to-underscores and all.perltidy_line_argvβ same deal as themasontidyoption of the same name, dashes-to-underscores and all.perltidy_tag_argvβ same deal as themasontidyoption of the same name, dashes-to-underscores and all.
π METHODS π
tidy ($source)
this is the one. you hand it component source $source, it tidies it up, and it hands you back the tidied result. glow-up complete. β¨
β οΈ but listen β if the source can't be tidied (say, invalid syntax, oop), it will throw a fatal error. no gentle vibes, just a hard stop. don't say I didn't warn you. π
π«Ά AUTHOR π«Ά
Jonathan Swartz <swartz@pobox.com> β the legend who made this happen. thank you for your service, king. π
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2011 by Jonathan Swartz.
it's free software, bestie β you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. free as in freedom, free as in slay. π
aaaand that's the whole page! π this was Mason::Tidy, perl v5.42.0, dated 2025-07-25. mwah, go tidy something gorgeous. πβ¨π
π¦ where this page comes from
- fedora 43: perl-Mason-Tidy 2.57-30.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms