You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a new plugin to intercept send_as serialized requests, and (despite the fact that the call to execute_hook is in the Role's "around"), I'm not seeing the before_serializer or after_serializer hooks firing. The code in send_as seems to be calling up Dancer2::Core::Serializer::JSON::serialize here, but hooks just aren't firing! I've tried adding a before_serializer hook in the application, as well as this, in the plugin I'm working with:
$plugin->app->add_hook( Dancer2::Core::Hook->new( name => 'engine.serializer.before', code => sub { warn 'Oh, yeah!' }, ));
I think I'll put in some tracers in D2 code to make sure what apparently should be happening here, actually is. (It's possible I'm Doing It Wrong, too, of course.)
The text was updated successfully, but these errors were encountered:
I'm working on a new plugin to intercept send_as serialized requests, and (despite the fact that the call to execute_hook is in the Role's "around"), I'm not seeing the before_serializer or after_serializer hooks firing. The code in send_as seems to be calling up Dancer2::Core::Serializer::JSON::serialize here, but hooks just aren't firing! I've tried adding a before_serializer hook in the application, as well as this, in the plugin I'm working with:
$plugin->app->add_hook( Dancer2::Core::Hook->new( name => 'engine.serializer.before', code => sub { warn 'Oh, yeah!' }, ));
I think I'll put in some tracers in D2 code to make sure what apparently should be happening here, actually is. (It's possible I'm Doing It Wrong, too, of course.)
The text was updated successfully, but these errors were encountered: