nings;
package CouchDB::View::Document;
use URI::Escape;
use Data::Dump::Streamer;
use JSON::XS;
my $j = JSON::XS->new;
sub new { bless $_[1] => $_[0] }
sub code_to_string {
my ($self, $code) =
$self->code_to_string($self->{views}{$_})
} keys %{ $self->{views} },
},
};
}
sub as_json {
my ($self) = @_;
return $j->encode($self->as_hash);
}
sub uri_id { uri_escape(shift->{_id
ith a hypothetical client
$couchdb_client->put(
'/mydatabase/' . $doc->uri_id,
$doc->as_json,
);
=head1 DESCRIPTION
CouchDB::View::Document provides a Perlish interface to creating L<Cou