diff -Nru perltidier-1.18/debian/changelog perltidier-1.18/debian/changelog --- perltidier-1.18/debian/changelog 2021-12-11 12:32:05.000000000 +0000 +++ perltidier-1.18/debian/changelog 2021-12-20 23:19:52.000000000 +0000 @@ -1,3 +1,9 @@ +perltidier (1.18-4) unstable; urgency=medium + + * extend patch 1001 to support prototypes and Future::AsyncAwait + + -- Jonas Smedegaard Tue, 21 Dec 2021 00:19:52 +0100 + perltidier (1.18-3) unstable; urgency=medium * add patch 1001 to support Object::Pad colon-prefixed attributes diff -Nru perltidier-1.18/debian/copyright_hints perltidier-1.18/debian/copyright_hints --- perltidier-1.18/debian/copyright_hints 2021-12-11 09:31:57.000000000 +0000 +++ perltidier-1.18/debian/copyright_hints 2021-12-20 23:19:52.000000000 +0000 @@ -29,6 +29,7 @@ debian/patches/series debian/rules debian/source/format + debian/source/lintian-overrides debian/upstream/metadata debian/watch t/00-version.t @@ -101,13 +102,3 @@ License: Perl FIXME -Files: debian/source/lintian-overrides -Copyright: Artistic - GPL-1+ - GPL-3+ - artistic - gpl-1+ - gpl-3+ -License: UNKNOWN - FIXME - diff -Nru perltidier-1.18/debian/patches/1001_Object-Pad.patch perltidier-1.18/debian/patches/1001_Object-Pad.patch --- perltidier-1.18/debian/patches/1001_Object-Pad.patch 2021-12-11 12:14:29.000000000 +0000 +++ perltidier-1.18/debian/patches/1001_Object-Pad.patch 2021-12-20 23:19:52.000000000 +0000 @@ -1,17 +1,17 @@ -Description: support Object::Pad colon-prefixed attributes +Description: support Object::Pad and Future::AsyncAwait Bug: https://github.com/mvgrimes/Perl-Tidy-Sweetened/issues/24 Author: Jonas Smedegaard -Last-Update: 2021-12-11 +Last-Update: 2021-12-21 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/lib/Perl/Tidy/Sweetened.pm +++ b/lib/Perl/Tidy/Sweetened.pm -@@ -49,14 +49,15 @@ +@@ -49,14 +49,28 @@ # Create a subroutine filter for: # method foo (Int $i) returns (Bool) {} -# where both the parameter list and the returns type are optional -+# method foo :Bar ($i %args) :Baz {} ++# method foo(@\@) :prototype(@\@) :Bar (Baz) ($i %args) {} +# where all of the parameter list, returns type, signature, and colon-prefixed parameters are optional $plugins->add_filter( Perl::Tidy::Sweetened::Keyword::Block->new( @@ -20,11 +20,24 @@ replacement => 'sub', clauses => - [ 'PAREN?', '(returns \s* PAREN)?', '(\b(?:is|but|does) \s+ \w+)?' ], -+ [ '(:\w+ PAREN? ( \s+ :\w+ PAREN?)* \s+)? PAREN? (\s+ :\w+ PAREN? ( \s+ :\w+ PAREN?)*)?', '(returns \s* PAREN)?', '(\b(?:is|but|does) \s+ \w+)?' ], ++ [ 'PAREN? ([:\s]+ \w+ PAREN?)* (\s* PAREN)?', '(returns \s* PAREN)?', '(\b(?:is|but|does) \s+ \w+)?' ], ++ ) ); ++ ++# Create a subroutine filter for: ++# async sub foo(@\@) :prototype(@\@) :Bar (Baz) ($i %args) {} ++# async method foo(@\@) :prototype(@\@) :Bar (Baz) ($i %args) {} ++# where all of the parameter list, returns type, signature, and colon-prefixed parameters are optional ++$plugins->add_filter( ++ Perl::Tidy::Sweetened::Keyword::Block->new( ++ keyword => 'async', ++ marker => 'ASYNC', ++ replacement => 'sub', ++ clauses => ++ [ '\w* (\s* PAREN)? ([:\s]+ \w+ PAREN?)* (\s* PAREN)?' ], ) ); # Create a subroutine filter for: -@@ -97,14 +98,40 @@ +@@ -97,14 +111,40 @@ # Create a subroutine filter for: # class Foo extends Bar { # class Foo with Bar, Baz { @@ -85,7 +98,7 @@ } RAW -method name1 : Attrib(Arg) { # comment -+method name1 :Attrib(Arg) { # comment ++method name1 :Attrib(Arg) { # comment } -sub name2 : Attrib(Arg) {$indent_tc# comment @@ -100,7 +113,7 @@ } RAW -method name1 : Attrib(Arg) { # comment -+method name1 :Attrib(Arg) { # comment ++method name1 :Attrib(Arg) { # comment } -sub name2 : Attrib(Arg) {$indent_tc# comment