diff options
author | matthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-02-09 17:23:48 +0000 |
---|---|---|
committer | matthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-02-09 17:23:48 +0000 |
commit | b419e52e9e87b885fed30435b12b0341f5514891 (patch) | |
tree | 26c46a83a6ada473940b9ab46d612f4797133d02 /lib/Reaction/UI/Skin.pm | |
parent | c11c77ee05dca6724de87734ade3124972649416 (diff) | |
download | reaction-b419e52e9e87b885fed30435b12b0341f5514891.tar.gz reaction-b419e52e9e87b885fed30435b12b0341f5514891.zip |
alter skin loading precedence (layoutset path search always starts from toip except for =extends NEXT
Diffstat (limited to 'lib/Reaction/UI/Skin.pm')
-rw-r--r-- | lib/Reaction/UI/Skin.pm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/Reaction/UI/Skin.pm b/lib/Reaction/UI/Skin.pm index e669245..a875366 100644 --- a/lib/Reaction/UI/Skin.pm +++ b/lib/Reaction/UI/Skin.pm @@ -83,19 +83,22 @@ class Skin which { } implements 'create_layout_set' => as { - my ($self, $name, $tried) = @_; + my ($self, $name) = @_; + $self->_create_layout_set($name, [], $self); + }; + + implements '_create_layout_set' => as { + my ($self, $name, $tried, $top_skin) = @_; if (my $path = $self->layout_path_for($name)) { return $self->layout_set_class->new( $self->layout_set_args_for($name), source_file => $path, + top_skin => $top_skin, ); } - $tried = [ @{$tried||[]}, $self->our_path_for_type('layout') ]; + $tried = [ @{$tried}, $self->our_path_for_type('layout') ]; if ($self->has_super) { - return $self->super->create_layout_set( - $name, - $tried - ); + return $self->super->_create_layout_set($name, $tried, $top_skin); } confess "Couldn't find layout set file for ${name}, tried " .join(', ', @$tried); |