File tree 1 file changed +13
-10
lines changed
lib/MetaCPAN/Server/Controller
1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -70,33 +70,36 @@ sub by_releases : Path('by_releases') : Args(0) {
70
70
71
71
# ArrayRef[ Dict[ author => Str, name => Str ] ]
72
72
my $arg = $c -> read_param(" releases" );
73
- my $ret = $c -> model(' CPAN::Release' )-> by_author_and_names( $arg );
73
+ my $ret = $c -> model(' CPAN::Release' )-> by_author_and_names($arg );
74
74
75
75
my @changes ;
76
- for my $release (@{$ret -> {releases }}) {
77
- my ($author , $name , $path ) = @{$release }{ qw( author name changes_file) };
76
+ for my $release ( @{ $ret -> {releases } } ) {
77
+ my ( $author , $name , $path )
78
+ = @{$release }{qw( author name changes_file) };
78
79
my $source = $c -> model(' Source' )-> path( $author , $name , $path ) // ' ' ;
79
80
80
81
my $content ;
81
82
try {
82
83
local $/ ;
83
84
$content = Encode::decode(
84
85
' UTF-8' ,
85
- (scalar $source -> openr-> getline),
86
+ ( scalar $source -> openr-> getline ),
86
87
Encode::FB_CROAK | Encode::LEAVE_SRC
87
88
);
88
- } catch {
89
+ }
90
+ catch {
89
91
$content = undef ;
90
92
};
91
93
92
- push @changes , {
93
- author => $author ,
94
- release => $name ,
94
+ push @changes ,
95
+ {
96
+ author => $author ,
97
+ release => $name ,
95
98
changes_text => $content ,
96
- }
99
+ };
97
100
}
98
101
99
- $c -> stash({ changes => \@changes });
102
+ $c -> stash( { changes => \@changes } );
100
103
}
101
104
102
105
1;
You can’t perform that action at this time.
0 commit comments