1Code::TidyAll::Result(3U)ser Contributed Perl DocumentatiCoonde::TidyAll::Result(3)
2
3
4
6 Code::TidyAll::Result - Result returned from processing a file/source
7
9 version 0.82
10
12 my $ct = Code::TidyAll->new(...);
13 my $result = $ct->process_file($file);
14 if ($result->error) {
15 ...
16 }
17
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
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
56 Bugs may be submitted at
57 <https://github.com/houseabsolute/perl-code-tidyall/issues>.
58
60 The source code repository for Code-TidyAll can be found at
61 <https://github.com/houseabsolute/perl-code-tidyall>.
62
64 • Jonathan Swartz <swartz@pobox.com>
65
66 • Dave Rolsky <autarch@urth.org>
67
69 This software is copyright (c) 2011 - 2022 by Jonathan Swartz.
70
71 This is free software; you can redistribute it and/or modify it under
72 the same terms as the Perl 5 programming language system itself.
73
74 The full text of the license can be found in the LICENSE file included
75 with this distribution.
76
77
78
79perl v5.34.1 2022-04-19 Code::TidyAll::Result(3)