- Fix test failures on perl < 5.8.7 and new Package::Stash::XS
- Fix TxnScopeGuard not behaving correctly when $@ is set at the
time of $guard instantiation
+ - Fix the join/prefetch resolver when dealing with ''/undef/()
+ relation specifications
* Misc
- No longer depend on Variable::Magic now that a pure-perl
$position++;
}
my ($import_key) = ( ref $import_element eq 'HASH' ) ? keys %{$import_element} : ($import_element);
+ $import_key = '' if not defined $import_key;
if ($best_candidate->{score} == 0 || exists $seen_keys->{$import_key}) {
push( @{$orig}, $import_element );
$jpath = [@$jpath]; # copy
- if (not defined $join) {
+ if (not defined $join or not length $join) {
return ();
}
elsif (ref $join eq 'ARRAY') {
my ($self, $pre, $alias, $alias_map, $order, $collapse, $pref_path) = @_;
$pref_path ||= [];
- if (not defined $pre) {
+ if (not defined $pre or not length $pre) {
return ();
}
elsif( ref $pre eq 'ARRAY' ) {
my $cd_paths = {
'no cd' => [],
+ 'no cd empty' => [ '' ],
+ 'no cd undef' => [ undef ],
+ 'no cd href' => [ {} ],
+ 'no cd aoh' => [ [{}] ],
+ 'no cd complex' => [ [ [ undef ] ] ],
'cd' => ['cd'],
'cd->artist1' => [{'cd' => 'artist'}]
};
my $a2a_paths = {
'no a2a' => [],
+ 'no a2a empty ' => [ '' ],
+ 'no a2a undef' => [ undef ],
+ 'no a2a href' => [ {} ],
+ 'no a2a aoh' => [ [{}] ],
+ 'no a2a complex' => [ [ '' ] ],
'a2a' => ['artwork_to_artist'],
'a2a->artist2' => [{'artwork_to_artist' => 'artist'}]
};