Debian Codegraph @

lib/Perl/Tidy/Sweet.pm

raw symbols SCIP
1 package Perl::Tidy::Sweet;
2
3 # ABSTRACT: Tweaks to Perl::Tidy to support some syntactic sugar
4
5 use strict;
6 use warnings;
7 use base 'Perl::Tidy::Sweetened';
8
9 our $VERSION = '1.20';
10
11 1;
12
13 __END__
14
15 =pod
16
17 =head1 NAME
18
19 Perl::Tidy::Sweet - Tweaks to Perl::Tidy to support some syntactic sugar
20
21 =head1 VERSION
22
23 version 1.20
24
25 =head1 STATUS
26
27 =for html <a href="https://travis-ci.org/mvgrimes/Perl-Tidy-Sweetened"><img src="https://travis-ci.org/mvgrimes/Perl-Tidy-Sweetened.svg?branch=master" alt="Build Status"></a>
28 <a href="https://metacpan.org/pod/Perl::Tidy::Sweetened"><img alt="CPAN version" src="https://badge.fury.io/pl/Perl-Tidy-Sweetened.svg" /></a>
29
30 =head1 DESCRIPTION
31
32 There are a number of modules on CPAN that allow users to write their classes
33 with a more "modern" syntax. These tools eliminate the need to shift off
34 C<$self>, can support type checking and offer other improvements.
35 Unfortunately, they can break the support tools that the Perl community has
36 come to rely on. This module attempts to work around those issues.
37
38 The module uses
39 L<Perl::Tidy>'s C<prefilter> and C<postfilter> hooks to support C<method> and
40 C<func> keywords, including the (possibly multi-line) parameter lists. This is
41 quite an ugly hack, but it is the recommended method of supporting these new
42 keywords (see the 2010-12-17 entry in the Perl::Tidy
43 L<CHANGES|https://metacpan.org/source/SHANCOCK/Perl-Tidy-20120714/CHANGES>
44 file). B<The resulting formatted code will leave the parameter lists untouched.>
45
46 C<Perl::Tidy::Sweetened> attempts to support the syntax outlined in the
47 following modules, but most of the new syntax styles should work:
48
49 =over
50
51 =item * p5-mop
52
53 =item * Method::Signatures::Simple
54
55 =item * MooseX::Method::Signatures
56
57 =item * MooseX::Declare
58
59 =item * Moops
60
61 =item * perl 5.20 signatures
62
63 =item * Kavorka
64
65 =back
66
67 =head1 SEE ALSO
68
69 L<Perl::Tidy>
70
71 =head1 AUTHOR
72
73 Mark Grimes <[email protected]>
74
75 =head1 SOURCE
76
77 Source repository is at L<https://github.com/mvgrimes/Perl-Tidy-Sweetened>.
78
79 =head1 BUGS
80
81 Please report any bugs or feature requests on the bugtracker website L<https://github.com/mvgrimes/Perl-Tidy-Sweetened/issues>
82
83 When submitting a bug or request, please include a test-file or a
84 patch to an existing test-file that illustrates the bug or desired
85 feature.
86
87 =head1 COPYRIGHT AND LICENSE
88
89 This software is copyright (c) 2023 by Mark Grimes <[email protected]>.
90
91 This is free software; you can redistribute it and/or modify it under
92 the same terms as the Perl 5 programming language system itself.
93
94 =cut