1Code::TidyAll::Result(3U)ser Contributed Perl DocumentatiCoonde::TidyAll::Result(3)
2
3
4

NAME

6       Code::TidyAll::Result - Result returned from processing a file/source
7

VERSION

9       version 0.72
10

SYNOPSIS

12           my $ct = Code::TidyAll->new(...);
13           my $result = $ct->process_file($file);
14           if ($result->error) {
15              ...
16           }
17

DESCRIPTION

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

METHODS

24       This class provides the following methods:
25
26   $result->path
27       The path that was processed, relative to the root (e.g. "lib/Foo.pm")
28
29   $result->state
30       A string, one of
31
32       ·   "no_match" - No plugins matched this file
33
34       ·   "cached" - Cache hit (file had not changed since last processed)
35
36       ·   "error" - An error occurred while applying one of the plugins
37
38       ·   "checked" - File was successfully checked and did not change
39
40       ·   "tidied" - File was successfully checked and changed
41
42   $result->orig_contents
43       Contains the original contents if state is 'tidied' and with some
44       errors (like when a file needs tidying in check-only mode)
45
46   $result->new_contents
47       Contains the new contents if state is 'tidied'
48
49   $result->error
50       Contains the error message if state is 'error'
51
52   $result->ok
53       Returns true iff state is not 'error'
54

SUPPORT

56       Bugs may be submitted at
57       <https://github.com/houseabsolute/perl-code-tidyall/issues>.
58
59       I am also usually active on IRC as 'autarch' on "irc://irc.perl.org".
60

SOURCE

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

AUTHORS

66       ·   Jonathan Swartz <swartz@pobox.com>
67
68       ·   Dave Rolsky <autarch@urth.org>
69
71       This software is copyright (c) 2011 - 2018 by Jonathan Swartz.
72
73       This is free software; you can redistribute it and/or modify it under
74       the same terms as the Perl 5 programming language system itself.
75
76       The full text of the license can be found in the LICENSE file included
77       with this distribution.
78
79
80
81perl v5.28.1                      2018-12-20          Code::TidyAll::Result(3)
Impressum