implements 'BUILD' => as {
my ($self, $args) = @_;
my @path = @{$args->{search_path}||[]};
- confess "No view object provided" unless $args->{view};
confess "No skin object provided" unless $args->{skin};
$self->_load_file($self->source_file, $args);
unless ($self->has_widget_class) {
- $self->widget_class($args->{view}->widget_class_for($self));
+ $self->widget_class($args->{skin}->widget_class_for($self));
}
};
has 'view' => (
is => 'ro', required => 1, weak_ref => 1,
- handles => [ qw(layout_set_class) ],
+ handles => [ qw(layout_set_class widget_class_for) ],
);
has 'super' => (
my ($self, $name) = @_;
return (
name => $name,
- view => $self->view,
skin => $self,
($self->has_super ? (next_skin => $self->super) : ()),
$self->view->layout_set_args_for($name),