$attrs->{alias} ||= 'me';
- # Creation of {} and bless separated to mitigate RH perl bug
- # see https://bugzilla.redhat.com/show_bug.cgi?id=196836
- my $self = {
+ my $self = bless {
result_source => $source,
cond => $attrs->{where},
pager => undef,
attrs => $attrs,
- };
-
- bless $self, $class;
+ }, $class;
$self->result_class(
$attrs->{result_class} || $source->result_class
);
- return $self;
+ $self;
}
=head2 search
use namespace::clean;
use overload
- # on some RH perls the following line causes serious performance problem
- # see https://bugzilla.redhat.com/show_bug.cgi?id=196836
q/""/ => sub { __PACKAGE__ . ":" . shift->source_moniker; },
fallback => 1;
unless $cleared->{hash_merge_singleton}{$weak_registry->{$slot}{weakref}{behavior}}++;
}
elsif ($slot =~ /^__TxnScopeGuard__FIXUP__/) {
- die 'The $@ debacle should have been fixed by now!!!' if $] >= 5.013008;
- delete $weak_registry->{$slot};
+ delete $weak_registry->{$slot}
+ if $] > 5.013001 and $] < 5.013008;
}
}
DBICTest::Schema->source_registrations(undef);
my $tb = Test::More->builder;
-for my $slot (keys %$weak_registry) {
+for my $slot (sort keys %$weak_registry) {
ok (! defined $weak_registry->{$slot}{weakref}, "No leaks of $slot") or do {
my $diag = '';