use DBIx::Class::ResultSetColumn;
use Scalar::Util qw/blessed weaken/;
use Try::Tiny;
-use Data::Compare;
+use Data::Compare (); # no imports!!! guard against insane architecture
# not importing first() as it will clash with our own method
use List::Util ();
for (grep { exists $right->{$_} } keys %$left) {
# the use of eq_deeply here is justified - the rhs of an
# expression can contain a lot of twisted weird stuff
- delete $right->{$_} if Compare( $left->{$_}, $right->{$_} );
+ delete $right->{$_} if Data::Compare::Compare( $left->{$_}, $right->{$_} );
}
$right = undef unless keys %$right;
# cruft placed in standalone method
my $data = $self->_normalize_populate_args(@_);
+ return unless @$data;
+
if(defined wantarray) {
my @created;
foreach my $item (@$data) {
my ($self, $arg) = @_;
if (ref $arg eq 'ARRAY') {
- if (ref $arg->[0] eq 'HASH') {
+ if (!@$arg) {
+ return [];
+ }
+ elsif (ref $arg->[0] eq 'HASH') {
return $arg;
}
elsif (ref $arg->[0] eq 'ARRAY') {