diff options
Diffstat (limited to 'lib/Reaction/UI/Controller.pm')
-rw-r--r-- | lib/Reaction/UI/Controller.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Reaction/UI/Controller.pm b/lib/Reaction/UI/Controller.pm index 8ed781f..2d1b843 100644 --- a/lib/Reaction/UI/Controller.pm +++ b/lib/Reaction/UI/Controller.pm @@ -11,7 +11,8 @@ with 'Catalyst::Component::InstancePerContext'; sub build_per_context_instance { my ($self, $c, @args) = @_; - my $newself = $self->new($self->_application, {%$self, context => $c, @args}); + my $class = ref($self) || $self; + my $newself = $class->new($self->_application, {%$self, context => $c, @args}); return $newself; } |