1 package DBIx::Data::Collection::Set::Wrapper::Inflate;
7 bless({ %{$_[0]} }, ref($proto)||$proto);
10 sub _inflator { shift->{inflator} }
11 sub _inner { shift->{inner} }
15 map $self->_inflator->inflate($_), $self->_inner->flatten;
20 my $inflator = $self->_inflator;
21 DBIx::Data::Stream::Mapped->new({
22 inner => $self->_inner->to_stream,
23 mapper => sub { $inflator->inflate($_) }
27 sub clear { shift->_inner->clear }
30 my ($self, $spec) = @_;
31 my $inflator = $self->_inflator;
32 if (my $got = $self->_inner->get($inflator->deflate_spec($spec))) {
33 return $inflator->inflate($got);
39 my ($self, $spec, $body) = @_;
40 my $inflator = $self->_inflator;
41 $self->_inner->replace(
42 $inflator->deflate_spec($spec),
43 $inflator->deflate_body($body),
48 my ($self, $body) = @_;
49 my $inflator = $self->_inflator;
52 $inflator->deflate_body($body)
58 my ($self, $spec) = @_;
59 $self->_inner->remove($self->_inflator->deflate_spec($spec));
63 require DBIx::Data::Collection::Set::Mapped;
64 DBIx::Data::Collection::Set::Mapped->new({
65 inner => $_[0], mapper => $_[1]