X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FReaction%2FUI%2FSkin.pm;h=7f3f1ca31bf221ee5188b98dd903f60eefca86f0;hb=7c2bcb55574ebbea6c51b67b5994149400da4895;hp=ff31a3aec97f4df4f888f0b9c326caefbc511f69;hpb=b269d2bfde94e4e778395632ccf754d1f24c3ab7;p=catagits%2FReaction.git diff --git a/lib/Reaction/UI/Skin.pm b/lib/Reaction/UI/Skin.pm index ff31a3a..7f3f1ca 100644 --- a/lib/Reaction/UI/Skin.pm +++ b/lib/Reaction/UI/Skin.pm @@ -33,6 +33,21 @@ class Skin which { my $base = $self->skin_base_path; confess "No such skin base directory ${base}" unless -d $base; + if (-e (my $conf_file = $base->file('skin.conf'))) { + # we get [ { $file => $conf } ] + my ($cfg) = values %{ + Config::Any->load_files({ + files => [ $conf_file ], use_ext => 1 + })->[0] + }; + if (my $super_name = $cfg->{extends}) { + my $super_dir = $base->parent->subdir($super_name); + my $super = $self->new( + view => $self->view, skin_base_path => $super_dir + ); + $self->super($super); + } + } } implements 'create_layout_set' => as {