if (my $conf_class = delete $vp_attr->{class}) {
$class = $conf_class;
}
- %args = (%$vp_attr, @proto_args);
+ %args = %{ $self->merge_config_hashes($vp_attr, {@proto_args}) };
} else {
$class = $vp_attr;
%args = @proto_args;
has target => (isa => 'Object', is => 'rw', required => 1);
has action => (isa => 'CodeRef', is => 'rw', required => 1);
- implements BUILD => as{
+ implements BUILD => as {
my $self = shift;
$self->label( $self->label->($self->target) ) if ref $self->label eq 'CODE';
};
implements BUILD => as {
my ($self, $args) = @_;
- my $member_args = delete $args->{Member};
- $self->member_args( $member_args ) if ref $member_args;
+ if( my $member_args = delete $args->{Member} ){
+ $self->member_args( $member_args );
+ }
};
implements _build_member_args => as{ {} };
implements BUILD => as {
my ($self, $args) = @_;
- my $field_args = delete $args->{Field};
- $self->field_args( $field_args ) if ref $field_args;
+ if( my $field_args = delete $args->{Field} ){
+ $self->field_args( $field_args );
+ }
};
implements _build_excluded_fields => as { [] };