File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
lib/MetaCPAN/Server/Controller Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -76,20 +76,15 @@ sub by_releases : Path('by_releases') : Args(0) {
76
76
for my $release ( @{ $ret -> {releases } } ) {
77
77
my ( $author , $name , $path )
78
78
= @{$release }{qw( author name changes_file) };
79
- my $source = $c -> model(' Source' )-> path( $author , $name , $path ) // ' ' ;
79
+ my $source = $c -> model(' Source' )-> path( $author , $name , $path ) or next ;
80
80
81
- my $content ;
82
- try {
83
- local $/ ;
84
- $content = Encode::decode(
81
+ my $content = try {
82
+ Encode::decode(
85
83
' UTF-8' ,
86
- ( scalar $source -> openr -> getline ),
84
+ ( scalar $source -> slurp ),
87
85
Encode::FB_CROAK | Encode::LEAVE_SRC
88
86
);
89
- }
90
- catch {
91
- $content = undef ;
92
- };
87
+ } or next ;
93
88
94
89
push @changes ,
95
90
{
You can’t perform that action at this time.
0 commit comments