diff options
author | edenc <edenc@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-09-17 18:14:04 +0000 |
---|---|---|
committer | edenc <edenc@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-09-17 18:14:04 +0000 |
commit | 987fc6e26baea18fa0c3c48fb1208c5c350a4bc1 (patch) | |
tree | 6aec7fc955162eb069c8b322904dce14f0b76a7b | |
parent | a841aae8c18238dc34d87e5eda150ab2f0770475 (diff) | |
download | reaction-987fc6e26baea18fa0c3c48fb1208c5c350a4bc1.tar.gz reaction-987fc6e26baea18fa0c3c48fb1208c5c350a4bc1.zip |
compatibility fixes for Class::MOP 0.93
-rw-r--r-- | lib/Reaction/UI/Controller.pm | 3 | ||||
-rw-r--r-- | lib/Reaction/UI/Skin.pm | 3 |
2 files changed, 4 insertions, 2 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; } 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}, |