Group
Extension

Matches 2

CouchDB-Utils ( B/BA/BARTENDER/CouchDB-Utils-0.3.tar.gz, BARTENDER, 2013; MetaCPAN )
CouchDB-Utils/lib/CouchDB/Utils/App/Command/dump.pm ( view source; MetaCPAN )
arnings;
package CouchDB::Utils::App::Command::dump;

use App::Cmd::Setup -command;

use URI;
use JSON::XS;
use File::Path qw(mkpath);
use File::Spec::Functions qw(rel2abs catdir catfile);
use AnyEven

sub execute {
	my ($self, $opt, $args) = @_;

	## this will be used to pretty format json
        my $json = JSON->new->allow_nonref->pretty;

	my $name = $args->[0]; ## database name
	## unspecified
 => $start, ids => \@ids };
		}

		## pretty json formating makes it easier to edit the docs once
		## they are on the file system
		my $pretty_doc = $json->encode($doc); 
		_dump(catfile($doc_dir,'do
CouchDB-Utils ( B/BA/BARTENDER/CouchDB-Utils-0.3.tar.gz, BARTENDER, 2013; MetaCPAN )
CouchDB-Utils/lib/CouchDB/Utils/App/Command/load.pm ( view source; MetaCPAN )
ct;
use warnings;
package CouchDB::Utils::App::Command::load;

use App::Cmd::Setup -command;

use JSON;
use MIME::Base64;
use File::Basename;
use File::Slurp qw(read_file);
use File::Spec::Functions q

		$uri->port($opt->{port});
		$uri->path($name);
	}

	my $db = couchdb($uri->as_string);
	my $json = JSON->new->allow_nonref->pretty;

	my @docs;
	opendir (my $dh, $path) || die $!;
	while (my $f = r

			my $doc_path = catfile($path, $id, 'doc');
			open DOC, ">$doc_path" or die $!;
			print DOC $json->encode($doc);
			close DOC;

		} elsif ($load->{error}) {
			warn "$load->{id} $load->{error}: $

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.