Code::TidyAll::Result(3pm)

Code::TidyAll::Result3pm

Result returned from processing a file/source

Usage

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

Version

version 0.84

Overview

Represents the result of "Code::TidyAll->process_file" and "Code::TidyAll->process_file". A list of these is returned from " Code::TidyAll-"process_paths >>.

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>.

Releases

6 releases since Debian 8 (Jessie); the text changed 5 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12
  6. 13

Authors

•

Jonathan Swartz <[email protected]>

•

Dave Rolsky <[email protected]>

From libcode-tidyall-perl 0.84~ds-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.