From 987fc6e26baea18fa0c3c48fb1208c5c350a4bc1 Mon Sep 17 00:00:00 2001 From: edenc Date: Thu, 17 Sep 2009 18:14:04 +0000 Subject: compatibility fixes for Class::MOP 0.93 --- lib/Reaction/UI/Controller.pm | 3 ++- lib/Reaction/UI/Skin.pm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') 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; } diff --git a/lib/Reaction/UI/Skin.pm b/lib/Reaction/UI/Skin.pm index 237279d..0683258 100644 --- a/lib/Reaction/UI/Skin.pm +++ b/lib/Reaction/UI/Skin.pm @@ -71,6 +71,7 @@ sub _find_skin_dir { }; sub _load_skin_config { my ($self, $args) = @_; + my $class = ref($self) || $self; my $base = $self->skin_dir; my $lst = sub { (ref $_[0] eq 'ARRAY') ? $_[0] : [$_[0]] }; my @files = ( @@ -84,7 +85,7 @@ sub _load_skin_config { })} ); if (my $super_name = $cfg{extends}) { - my $super = $self->new( + my $super = $class->new( name => $super_name, view => $self->view, skin_base_dir => $args->{skin_base_dir}, -- cgit v1.2.3-54-g00ecf