->install_delayed
->register_attribute_specs(do {
my @spec;
- # using the -last- entry in @ISA means that classes created by
- # Role::Tiny as N roles + superclass will still get the attributes
- # from the superclass
+ # using the -last- entry in @ISA means that classes created by
+ # Role::Tiny as N roles + superclass will still get the attributes
+ # from the superclass
if (my $super = do { no strict 'refs'; ${"${target}::ISA"}[-1] }) {
if (my $con = $MAKERS{$super}{constructor}) {
@spec = %{$con->all_attribute_specs};
$NO_BUILD{$class}
? bless({ ref($_[0]) eq 'HASH' ? %{$_[0]} : @_ }, $class)
: do {
- my $proto = ref($_[0]) eq 'HASH' ? $_[0] : { @_ };
- bless({ %$proto }, $class)->BUILDALL($proto);
+ my $proto = ref($_[0]) eq 'HASH' ? $_[0] : { @_ };
+ bless({ %$proto }, $class)->BUILDALL($proto);
};
}
."\n${get_indent})";
($spec->{isa}
? " {\n my \$value = ".$get_value.";\n "
- .$self->_generate_isa_check(
- $name, '$value', $spec->{isa}
- ).";\n"
- .' '.$self->_generate_simple_set($me, $name, '$value').";\n"
- ." }\n"
+ .$self->_generate_isa_check(
+ $name, '$value', $spec->{isa}
+ ).";\n"
+ .' '.$self->_generate_simple_set($me, $name, '$value').";\n"
+ ." }\n"
: ' '.$self->_generate_simple_set($me, $name, $get_value).";\n"
)
.($spec->{trigger}
? ' '
- .$self->_generate_trigger(
- $name, $me, $self->_generate_simple_get($me, $name),
- $spec->{trigger}
- )." if ${test};\n"
+ .$self->_generate_trigger(
+ $name, $me, $self->_generate_simple_get($me, $name),
+ $spec->{trigger}
+ )." if ${test};\n"
: ''
);
} else {
" if (${test}) {\n"
.($spec->{isa}
? " "
- .$self->_generate_isa_check(
- $name, $source, $spec->{isa}
- ).";\n"
+ .$self->_generate_isa_check(
+ $name, $source, $spec->{isa}
+ ).";\n"
: ""
)
." ".$self->_generate_simple_set($me, $name, $source).";\n"
.($spec->{trigger}
- ? " "
- .$self->_generate_trigger(
- $name, $me, $self->_generate_simple_get($me, $name),
- $spec->{trigger}
- ).";\n"
- : ""
+ ? " "
+ .$self->_generate_trigger(
+ $name, $me, $self->_generate_simple_get($me, $name),
+ $spec->{trigger}
+ ).";\n"
+ : ""
)
." }\n";
}
join '', (
@init
? ' '.$self->_cap_call($ag->generate_multi_set(
- '$new', [ @slots ], '@{$args}{qw('.join(' ',@init).')}'
- )).";\n"
+ '$new', [ @slots ], '@{$args}{qw('.join(' ',@init).')}'
+ )).";\n"
: ''
), map {
my $arg_key = perlstring($test{$_});