Skip to content

Commit

Permalink
fix vacuum tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nics committed May 23, 2016
1 parent 7dfe14b commit 2fdccf6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Build.PL
@@ -1,5 +1,5 @@

# This file was automatically generated by Dist::Zilla::Plugin::ModuleBuild v5.039.
# This file was automatically generated by Dist::Zilla::Plugin::ModuleBuild v5.041.
use strict;
use warnings;

Expand Down
1 change: 1 addition & 0 deletions Changes
@@ -1,6 +1,7 @@
Revision history for Catmandu

{{$NEXT}}
- faster, simpler vacuum fix

1.02 2016-05-20 11:33:38 CEST
- all fixes and fix conditions can be used inline now
Expand Down
2 changes: 1 addition & 1 deletion lib/Catmandu/Fix/vacuum.pm
Expand Up @@ -27,7 +27,7 @@ sub _empty {
sub fix {
my ($self, $data) = @_;

return $data unless is_hash_ref($data) || is_array_ref($data);
return $data unless $self->_visit($data);

my @stack = ($data);
my %seen;
Expand Down
6 changes: 3 additions & 3 deletions t/Catmandu-Fix-vacuum.t
Expand Up @@ -21,7 +21,7 @@ BEGIN {
use_ok $pkg;
}

my $res = $pkg->new()->fix(
my $res = $pkg->new->fix(
{
arrays => [],
hashes => {},
Expand All @@ -34,7 +34,7 @@ my $res = $pkg->new()->fix(
}
);

is_deeply $res, {keep_me => {me => 1}, keep_me_2 => [undef, [":-P yuck"]]},
is_deeply $res, {keep_me => {me => 1}, keep_me_2 => [[":-P yuck"]]},
"data is vacuumed";

done_testing 2;
done_testing;

0 comments on commit 2fdccf6

Please sign in to comment.