te db response is: ", $/, $conn->json()->encode($resp), $/;
my $resp = $conn->create_doc('mb_test', {foo => 'bar'});
print "create doc response is: ", $/, $conn->json()->encode($resp), $/;
my $respOb
", $/, $conn->json()->encode($resp), $/;
$respObj = $resp;
$respObj->{bleh} = 'blah';
$resp = $conn->update_doc('mb_test', $id, $respObj);
print "update response is: ", $/, $conn->json()->encode($re
al get doc response is: ", $/, $conn->json()->encode($resp), $/;
my $rev = $resp->{_rev};
$resp = $conn->all_dbs();
print "all dbs response is: ", $/, $conn->json()->encode($resp), $/;
$resp = $conn-
r(), $/;
return;
}
VIEW: while (my $doc = $test->next()) {
print $server->json->encode($doc);
my $stop;
$self->get_response('Continue viewing results?[Y/n]', su
schema_from_db();
}
}
=head2 load_schema_from_script($script)
loads a CouchDB Schema from a json script file. This is sort of like the DDL
in a SQL DB only its essentially just a list of _design
hema_from_script {
my $self = shift;
my $script = shift;
$self->schema($self->server->json->decode($script));
return $self;
}
=head2 load_schema_from_db()
Loads a CouchDB Schema from
et_doc($docname);
push @docs, $doc;
}
$db->json->pretty([$pretty]);
my $script = $db->json->encode(\@docs);
$db->json->pretty([undef]);
return $script;
}
sub _mk_view_acce
package DB::CouchDB;
use warnings;
use strict;
use JSON -convert_blessed_universally;
use LWP::UserAgent;
use URI;
use Encode;
$DB::CouchDB::VERSION = 0.2;
=head1 NAME
DB::CouchDB - A low leve
_;
$opts{port} = 5984
if (!exists $opts{port});
my $obj = {%opts};
$obj->{json} = JSON->new();
return bless $obj, $class;
}
=head2 Accessors
=over 4
=item *
host - host na
=item *
json - the JSON object for serialization
=back
=cut
sub host {
return shift->{host};
}
sub port {
return shift->{port};
}
sub db {
return shift->{db};
}
sub json {
my