video url handling
[catagits/App-IdiotBox.git] / lib / App / IdiotBox / DataSet.pm
CommitLineData
265c2b91 1package App::IdiotBox::DataSet;
2
3use strict;
4use warnings FATAL => 'all';
5use Scalar::Util qw(blessed);
6
7use base qw(DBIx::Data::Collection::Set);
8
9sub _inflate {
10 my ($self, $raw) = @_;
11 my %new;
12 foreach my $k (keys %$raw) {
13 my @parts = split /\./, $k;
14 my $final = pop @parts;
15 @parts or ($new{$k} = $raw->{$k}, next);
16 my $targ = \%new;
17 $targ = $targ->{$_}||={} for @parts;
18 $targ->{$final} = $raw->{$k};
19 }
20 $self->_class->{inflate}->($self, \%new);
21}
22
23sub _deflate {
24 my ($self, $obj) = @_;
25 $self->_class->{deflate}->($self, $obj)
26}
27
28sub _merge { die "no" }
29
301;