use Catalyst::Utils;
use Class::Load qw(load_class is_class_loaded);
use Sub::Exporter;
+use Moose::Util 'find_meta';
use Carp 'croak', 'carp';
sub _build_request_export {
# hook into 'dispatch' -- the function gets called after all plugins
# have done their work, and it's an easy place to capture $c.
- my $meta = Class::MOP::get_metaclass_by_name($class);
+ my $meta = find_meta($class);
$meta->make_mutable;
$meta->add_after_method_modifier( "dispatch", sub {
$ctx_closed_over = shift;