File tree Expand file tree Collapse file tree 3 files changed +10
-11
lines changed Expand file tree Collapse file tree 3 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ use JSON;
88use List::MoreUtils ();
99use Moose::Util ();
1010use Moose;
11- use Try::Tiny;
1211
1312BEGIN { extends ' Catalyst::Controller' ; }
1413
@@ -81,8 +80,8 @@ sub get : Path('') : Args(1) {
8180 if ( !defined $file ) {
8281 $c -> detach( ' /not_found' , [' Not found' ] );
8382 }
84- try { $c -> stash( $file -> {_source } || $file -> {fields } ) }
85- or $c -> detach( ' /not_found' ,
83+ $c -> stash( $file -> {_source } || $file -> {fields } )
84+ || $c -> detach( ' /not_found' ,
8685 [' The requested field(s) could not be found' ] );
8786}
8887
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ use strict;
44use warnings;
55
66use Moose;
7- use Try::Tiny;
87
98BEGIN { extends ' MetaCPAN::Server::Controller::File' }
109
@@ -16,9 +15,10 @@ sub get : Path('') : Args(1) {
1615 if ( !defined $file ) {
1716 $c -> detach( ' /not_found' , [] );
1817 }
19- try { $c -> stash( $file -> {_source } || $file -> {fields } ) }
20- or $c -> detach( ' /not_found' ,
18+ $c -> stash( $file -> {_source } || $file -> {fields } )
19+ || $c -> detach( ' /not_found' ,
2120 [' The requested field(s) could not be found' ] );
2221}
2322
23+ __PACKAGE__ -> meta-> make_immutable();
24241;
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ use strict;
44use warnings;
55
66use Moose;
7- use Try::Tiny;
87
98BEGIN { extends ' MetaCPAN::Server::Controller' }
109
@@ -25,8 +24,8 @@ sub find : Path('') : Args(1) {
2524 if ( !defined $file ) {
2625 $c -> detach( ' /not_found' , [] );
2726 }
28- try { $c -> stash( $file -> {_source } || $file -> {fields } ) }
29- or $c -> detach( ' /not_found' ,
27+ $c -> stash( $file -> {_source } || $file -> {fields } )
28+ || $c -> detach( ' /not_found' ,
3029 [' The requested field(s) could not be found' ] );
3130}
3231
@@ -41,9 +40,10 @@ sub get : Path('') : Args(2) {
4140 if ( !defined $file ) {
4241 $c -> detach( ' /not_found' , [] );
4342 }
44- try { $c -> stash( $file -> {_source } || $file -> {fields } ) }
45- or $c -> detach( ' /not_found' ,
43+ $c -> stash( $file -> {_source } || $file -> {fields } )
44+ || $c -> detach( ' /not_found' ,
4645 [' The requested field(s) could not be found' ] );
4746}
4847
48+ __PACKAGE__ -> meta-> make_immutable;
49491;
You can’t perform that action at this time.
0 commit comments