my $self = shift;
my $attr = $self->associated_attribute;
- return try {
+ my $RuNNeR; return bless sub { if (!defined($RuNNeR)) { $RuNNeR = try {
$self->_compile_code([
'sub {',
'if (@_ > 1) {',
catch {
confess "Could not generate inline accessor because : $_";
};
+ return $RuNNeR if !defined($_[0]) && ref($_[1]) && ref($_[1]) eq 'RuNNeR'}; goto $RuNNeR},'RuNNeR';
}
sub _generate_reader_method {
my $self = shift;
my $attr = $self->associated_attribute;
- return try {
+ my $RuNNeR; return bless sub { if (!defined($RuNNeR)) { $RuNNeR = try {
$self->_compile_code([
'sub {',
'if (@_ > 1) {',
catch {
confess "Could not generate inline reader because : $_";
};
+ return $RuNNeR if !defined($_[0]) && ref($_[1]) && ref($_[1]) eq 'RuNNeR'}; goto $RuNNeR},'RuNNeR';
}
sub _inline_throw_error {
my $self = shift;
my $attr = $self->associated_attribute;
- return try {
+ my $RuNNeR; return bless sub { if (!defined($RuNNeR)) { $RuNNeR = try {
$self->_compile_code([
'sub {',
$attr->_inline_set_value('$_[0]', '$_[1]'),
catch {
confess "Could not generate inline writer because : $_";
};
+ return $RuNNeR if !defined($_[0]) && ref($_[1]) && ref($_[1]) eq 'RuNNeR'}; goto $RuNNeR},'RuNNeR';
}
sub _generate_predicate_method {
my $self = shift;
my $attr = $self->associated_attribute;
- return try {
+ my $RuNNeR; return bless sub { if (!defined($RuNNeR)) { $RuNNeR = try {
$self->_compile_code([
'sub {',
$attr->_inline_has_value('$_[0]'),
catch {
confess "Could not generate inline predicate because : $_";
};
+ return $RuNNeR if !defined($_[0]) && ref($_[1]) && ref($_[1]) eq 'RuNNeR'}; goto $RuNNeR},'RuNNeR';
}
sub _generate_clearer_method {
my $self = shift;
my $attr = $self->associated_attribute;
- return try {
+ my $RuNNeR; return bless sub { if (!defined($RuNNeR)) { $RuNNeR = try {
$self->_compile_code([
'sub {',
$attr->_inline_clear_value('$_[0]'),
catch {
confess "Could not generate inline clearer because : $_";
};
+ return $RuNNeR if !defined($_[0]) && ref($_[1]) && ref($_[1]) eq 'RuNNeR'}; goto $RuNNeR},'RuNNeR';
}
1;