File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,7 @@ Mojolicious::WeBWorK - Mojolicious app for WeBWorK 2.
2424
2525use Env qw( WEBWORK_SERVER_ADMIN) ;
2626
27- use Mojo::JSON qw( encode_json) ;
28- use Scalar::Util qw( weaken) ;
27+ use Mojo::JSON qw( encode_json) ;
2928
3029use WeBWorK;
3130use WeBWorK::CourseEnvironment;
@@ -147,8 +146,6 @@ sub startup ($app) {
147146 around_action => async sub ($next , $c , $action , $last ) {
148147 return $next -> () unless $c -> isa(' WeBWorK::ContentGenerator' );
149148
150- weaken $c ;
151-
152149 my $uri = $c -> req-> url-> path-> to_string;
153150 $c -> stash-> {warnings } //= ' ' ;
154151
@@ -174,7 +171,7 @@ sub startup ($app) {
174171
175172 $app -> hook(
176173 after_dispatch => sub ($c ) {
177- $SIG {__WARN__ } = $c -> stash-> {orig_sig_warn } if defined $c -> stash-> {orig_sig_warn };
174+ $SIG {__WARN__ } = ref ( $c -> stash-> {orig_sig_warn }) eq ' CODE ' ? $c -> stash-> {orig_sig_warn } : ' DEFAULT ' ;
178175
179176 if ($c -> isa(' WeBWorK::ContentGenerator' ) && $c -> ce) {
180177 $c -> authen-> store_session if $c -> authen;
You can’t perform that action at this time.
0 commit comments