File tree 1 file changed +2
-5
lines changed
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.
24
24
25
25
use Env qw( WEBWORK_SERVER_ADMIN) ;
26
26
27
- use Mojo::JSON qw( encode_json) ;
28
- use Scalar::Util qw( weaken) ;
27
+ use Mojo::JSON qw( encode_json) ;
29
28
30
29
use WeBWorK;
31
30
use WeBWorK::CourseEnvironment;
@@ -147,8 +146,6 @@ sub startup ($app) {
147
146
around_action => async sub ($next , $c , $action , $last ) {
148
147
return $next -> () unless $c -> isa(' WeBWorK::ContentGenerator' );
149
148
150
- weaken $c ;
151
-
152
149
my $uri = $c -> req-> url-> path-> to_string;
153
150
$c -> stash-> {warnings } //= ' ' ;
154
151
@@ -174,7 +171,7 @@ sub startup ($app) {
174
171
175
172
$app -> hook(
176
173
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 ' ;
178
175
179
176
if ($c -> isa(' WeBWorK::ContentGenerator' ) && $c -> ce) {
180
177
$c -> authen-> store_session if $c -> authen;
You can’t perform that action at this time.
0 commit comments