Encountering an undef value anywhere in this code is a sign of some glaring
omission. Perhaps a nullable column is annotated as is_nullable => 0 or
something similar. When this is the case we need the collapsing to stop
right there, as it is no longer safe to proceed.
}
return $args->{eval}
- ? ( eval "sub { $src }" || die $@ )
+ ? ( eval "sub $src" || die $@ )
: $src
;
}
# change the quoted placeholders to unquoted alias-references
$parser_src =~ s/ \' \xFF__VALPOS__(\d+)__\xFF \' /"\$_->[$1]"/gex;
- return $parser_src;
+ $parser_src = " { use strict; use warnings FATAL => 'all';\n$parser_src\n }";
}
# the simple non-collapsing nested structure recursor
$parser_src =~ s/ \' \xFF__VALPOS__(\d+)__\xFF \' /"\$cur_row_data->[$1]"/gex;
$parser_src =~ s/ \' \xFF__IDVALPOS__(\d+)__\xFF \' /"\$cur_row_ids{$1}"/gex;
- $parser_src;
+ $parser_src = " { use strict; use warnings FATAL => 'all';\n$parser_src\n }";
}
$expect =~ s/__NBC__/B::perlstring($DBIx::Class::ResultSource::RowParser::Util::null_branch_class)/ge;
+ $expect = " { use strict; use warnings FATAL => 'all';\n$expect\n }";
+
my @normalized = map {
my $cref = eval "sub { $_ }" or do {
fail "Coderef does not compile!\n\n$@\n\n$_";