Code::T...::Result(3)

✨ NAME ✨

Okay so this is the manual page for Code::TidyAll::Result β€” literally the result returned from processing a file/source. The manual name folded up top is Code::T...::Result(3), from the User Contributed Perl Documentation, and it’s giving β€œsmall object, big main character energy” πŸ’….

πŸŽ€ VERSION πŸŽ€

version 0.84 β€” that’s the version, bestie, no cap.

πŸ¦‹ SYNOPSIS πŸ¦‹

my $ct = Code::TidyAll->new(...);
my $result = $ct->process_file($file);
if ($result->error) {
   ...
}

🌸 DESCRIPTION 🌸

This class represents the result of Code::TidyAll->process_file and Code::TidyAll->process_file β€” yes, the original page lists that same thing twice, and I’m not gonna β€œfix” it for you 😭. A list of these is returned from " Code::TidyAll-"process_paths >> β€” that’s the exact weird-looking text on the page, so I’m keeping it character for character, iykyk.

πŸ’… METHODS πŸ’…

This class provides the following methods:

⭐ $result->path ⭐

The path that was processed, relative to the root (e.g. lib/Foo.pm).

⭐ $result->state ⭐

A string, one of:

  • "no_match" β€” No plugins matched this file.
  • "cached" β€” Cache hit (file had not changed since last processed).
  • "error" β€” An error occurred while applying one of the plugins.
  • "checked" β€” File was successfully checked and did not change.
  • "tidied" β€” File was successfully checked and changed.

⭐ $result->orig_contents ⭐

Contains the original contents if state is 'tidied' and with some errors (like when a file needs tidying in check-only mode).

⭐ $result->new_contents ⭐

Contains the new contents if state is 'tidied'.

⭐ $result->error ⭐

Contains the error message if state is 'error'.

⭐ $result->ok ⭐

Returns true iff state is not 'error'.

🫢 SUPPORT 🫢

Bugs may be submitted at <https://github.com/houseabsolute/perl-code-tidyall/issues>.

🧚 SOURCE 🧚

The source code repository for Code-TidyAll can be found at <https://github.com/houseabsolute/perl-code-tidyall>.

πŸ‘‘ AUTHORS πŸ‘‘

  • Jonathan Swartz <swartz@pobox.com>
  • Dave Rolsky <autarch@urth.org>

This software is copyright (c) 2011 - 2023 by Jonathan Swartz.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

The full text of the license can be found in the LICENSE file included with this distribution.


And that’s the whole page, bestie 🫢 β€” perl v5.42.0, dated 2024-03-08, for Code::T...::Result(3). Slay πŸ’…βœ¨
πŸ“¦ where this page comes from