Permalink
Browse files

Switch to Module::Build

  • Loading branch information...
hideo55 committed Oct 15, 2012
1 parent e21167f commit 4d93c79559f8ff241bf2ad6c72edfef08c638ade
Showing with 209 additions and 169 deletions.
  1. +64 −0 Build.PL
  2. +6 −3 MANIFEST.SKIP
  3. +33 −32 Makefile.PL
  4. +106 −0 README
  5. +0 −134 README.pod
View
@@ -0,0 +1,64 @@
+use strict;
+use warnings FATAL => 'all';
+use Module::Build;
+
+my $class = Module::Build->subclass(
+ class => 'Module::Build::ArangoDB',
+ code => <<'END_OF_CODE',
+
+sub ACTION_test {
+ my $self = shift;
+ require App::Prove;
+ my $prove = App::Prove->new();
+ my @args = qw(--lib -Pt::lib::Prove::Plugin::StartArangoDB);
+ push @args, @{$self->{properties}{test_files}};
+ $prove->process_args(@args);
+ $prove->run();
+}
+
+END_OF_CODE
+);
+
+my $build = $class->new(
+ name => 'ArangoDB',
+ module_name => 'ArangoDB',
+ dist_author => 'Hideaki Ohno<hide.o.j55@gmail.com >',
+ license => 'perl',
+ recursive_test_files => 1,
+ dynamic_config => 0,
+ build_requires => {
+ 'Test::More' => '0.98',
+ 'Test::Harness' => '3.00',
+ 'Test::Fatal' => 0,
+ 'Test::Deep' => 0,
+ 'Test::TCP' => 0,
+ 'Test::Mock::Guard' => 0,
+ 'File::Temp' => 0,
+ },
+ configure_requires => { 'Module::Build' => '0.38' },
+ requires => {
+ 'perl' => '5.008001',
+ 'parent' => 0,
+ 'Scalar::Util' => '1.19',
+ 'Class::Accessor::Lite' => '0.05',
+ 'Carp' => 0,
+ 'JSON' => '2.53',
+ 'List::MoreUtils' => 0,
+ 'Furl' => '0.38',
+ 'MIME::Base64' => 0,
+ 'Data::Util' => '0.59',
+ },
+ recommands => { 'Data::Clone' => 0, },
+ no_index => { 'directory' => [ 't', 'xt', 'inc' ] },
+ test_files => ( -d '.git' || $ENV{RELEASE_TESTING} ) ? [qw(t/ xt/)] : ['t/'],
+ create_readme => 1,
+ create_makefile_pl => 'traditional',
+ meta_merge => {
+ keywords => [qw/arngodb database/],
+ resources => {
+ repository => 'git://github.com/hideo55/p5-ArangoDB.git',
+ bugtracker => 'https://github.com/hideo55/p5-ArangoDB/issues',
+ },
+ },
+);
+$build->create_build_script();
View
@@ -21,7 +21,10 @@
\.sw[po]$
\.project
\.gitignore
-MYMETA\.yml
-MYMETA\.json
+MYMETA\.
^cover_db
-^.includepath
+^.includepath
+^\_build
+^Build$
+^ArangoDB-
+^MANIFEST\.
View
@@ -1,32 +1,33 @@
-use inc::Module::Install;
-name 'ArangoDB';
-all_from 'lib/ArangoDB.pm';
-
-requires 'parent';
-requires 'Class::Accessor::Lite';
-requires 'Carp';
-requires 'JSON';
-requires 'Scalar::Util';
-requires 'List::MoreUtils';
-requires 'Furl';
-requires 'MIME::Base64';
-requires 'Data::Util';
-
-recommends 'Data::Clone';
-
-tests 't/*.t';
-author_tests 'xt';
-
-test_requires 'Test::More' => '0.94';
-test_requires 'Test::Harness' => '3.00';
-test_requires 'Test::Fatal';
-test_requires 'Test::TCP';
-test_requires 'File::Temp';
-test_requires 'Test::Deep';
-test_requires 'Test::Mock::Guard';
-
-auto_set_repository;
-auto_include;
-WriteAll;
-
-sub MY::test_via_harness {"\tprove --lib -Pt::lib::Prove::Plugin::StartArangoDB t\n"}
+# Note: this file was auto-generated by Module::Build::Compat version 0.4003
+require 5.008001;
+use ExtUtils::MakeMaker;
+WriteMakefile
+(
+ 'PL_FILES' => {},
+ 'INSTALLDIRS' => 'site',
+ 'test' => {
+ 'TESTS' => 't/*.t t/lib/*.t t/lib/Prove/*.t t/lib/Prove/Plugin/*.t'
+ },
+ 'VERSION_FROM' => 'lib/ArangoDB.pm',
+ 'PREREQ_PM' => {
+ 'Test::TCP' => 0,
+ 'Test::More' => '0.98',
+ 'Test::Harness' => '3.00',
+ 'Scalar::Util' => '1.19',
+ 'MIME::Base64' => 0,
+ 'Furl' => '0.38',
+ 'JSON' => '2.53',
+ 'Data::Util' => '0.59',
+ 'parent' => 0,
+ 'Test::Deep' => 0,
+ 'Class::Accessor::Lite' => '0.05',
+ 'Test::Mock::Guard' => 0,
+ 'Test::Fatal' => 0,
+ 'List::MoreUtils' => 0,
+ 'File::Temp' => 0,
+ 'Carp' => 0
+ },
+ 'EXE_FILES' => [],
+ 'NAME' => 'ArangoDB'
+ )
+;
View
106 README
@@ -0,0 +1,106 @@
+NAME
+ ArangoDB - ArangoDB client for Perl.
+
+SYNOPSIS
+ use ArangoDB;
+
+ my $db = ArangoDB->new({
+ host => 'localhost',
+ port => 8529,
+ keep_alive => 1,
+ });
+
+ # Find or create collection
+ my $foo = $db->foo;
+
+ # Create new document
+ $foo->save({ x => 42, y => { a => 1, b => 2, } });
+ $foo->save({ x => 1, y => { a => 1, b => 10, } });
+ $foo->name('new_name'); # rename the collection
+
+ # Create hash index.
+ $foo->create_hash_index([qw/x y/]);
+
+ # Simple query
+ my $cursor = $db->new_name->by_example({ b => 2 });
+ while( my $doc = $cursor->next ){
+ # do something
+ }
+
+ # AQL
+ my $cur = $db->query(
+ 'FOR u IN users FILTER u.age > @age SORT u.name ASC RETURN u'
+ )->bind( { age => 19 } )->execute();
+
+DESCRIPTION
+ ArangoDB is ArangoDB client for Perl.
+
+SUPPORT API VERSION
+ This supports ArangoDB API implementation 1.01.
+
+METHODS
+ new($options)
+ Constructor.
+
+ $options is HASH reference.The attributes of $options are:
+
+ host
+ Hostname or IP address of ArangoDB server.
+
+ Default: localhost
+
+ port
+ Port number of ArangoDB server.
+
+ Default: 8529
+
+ timeout
+ Seconds of HTTP connection timeout.
+
+ keep_alive
+ If it is true, use HTTP Keep-Alive connection.
+
+ Default: false
+
+ auth_type
+ Authentication method. Supporting "Basic" only.
+
+ auth_user
+ User name for authentication
+
+ auth_passwd
+ Password for authentication
+
+ proxy
+ Proxy url for HTTP connection.
+
+ create($name)
+ Create new collection. Returns instance of ArangoDB::Collection.
+
+ find($name)
+ Get a Collection based on $name. Returns instance of
+ ArangoDB::Collection.
+
+ If the collection does not exist, returns "undef".
+
+ collection($name)
+ Get or create a Collection based on $name.
+
+ If the Collection $name does not exist, Create it.
+
+ collections()
+ Get all collections. Returns ARRAY reference.
+
+ query($query)
+ Get AQL statement handler. Returns instance of ArangoDB::Statement.
+
+AUTHOR
+ Hideaki Ohno <hide.o.j55 {at} gmail.com>
+
+SEE ALSO
+ ArangoDB websie <http://www.arangodb.org/>
+
+LICENSE
+ This library is free software; you can redistribute it and/or modify it
+ under the same terms as Perl itself.
+
View
@@ -1,134 +0,0 @@
-=head1 NAME
-
-ArangoDB - ArangoDB client for Perl.
-
-=head1 SYNOPSIS
-
- use ArangoDB;
-
- my $db = ArangoDB->new({
- host => 'localhost',
- port => 8529,
- keep_alive => 1,
- });
-
- # Find or create collection
- my $foo = $db->foo;
-
- # Create new document
- $foo->save({ x => 42, y => { a => 1, b => 2, } });
- $foo->save({ x => 1, y => { a => 1, b => 10, } });
- $foo->name('new_name'); # rename the collection
-
- # Create hash index.
- $foo->create_hash_index([qw/x y/]);
-
- # Simple query
- my $cursor = $db->new_name->by_example({ b => 2 });
- while( my $doc = $cursor->next ){
- # do something
- }
-
- # AQL
- my $cur = $db->query(
- 'FOR u IN users FILTER u.age > @age SORT u.name ASC RETURN u'
- )->bind( { age => 19 } )->execute();
-
-=head1 DESCRIPTION
-
-ArangoDB is ArangoDB client for Perl.
-
-=head1 SUPPORT API VERSION
-
-This supports ArangoDB API implementation 1.01.
-
-=head1 METHODS
-
-=head2 new($options)
-
-Constructor.
-
-$options is HASH reference.The attributes of $options are:
-
-=over 4
-
-=item host
-
-Hostname or IP address of ArangoDB server.
-
-Default: localhost
-
-=item port
-
-Port number of ArangoDB server.
-
-Default: 8529
-
-=item timeout
-
-Seconds of HTTP connection timeout.
-
-=item keep_alive
-
-If it is true, use HTTP Keep-Alive connection.
-
-Default: false
-
-=item auth_type
-
-Authentication method. Supporting "Basic" only.
-
-=item auth_user
-
-User name for authentication
-
-=item auth_passwd
-
-Password for authentication
-
-=item proxy
-
-Proxy url for HTTP connection.
-
-=back
-
-=head2 create($name)
-
-Create new collection. Returns instance of L<ArangoDB::Collection>.
-
-=head2 find($name)
-
-Get a Collection based on $name. Returns instance of L<ArangoDB::Collection>.
-
-If the collection does not exist, returns C<undef>.
-
-=head2 collection($name)
-
-Get or create a Collection based on $name.
-
-If the Collection $name does not exist, Create it.
-
-=head2 collections()
-
-Get all collections. Returns ARRAY reference.
-
-=head2 query($query)
-
-Get AQL statement handler. Returns instance of L<ArangoDB::Statement>.
-
-=head1 AUTHOR
-
-Hideaki Ohno E<lt>hide.o.j55 {at} gmail.comE<gt>
-
-=head1 SEE ALSO
-
-ArangoDB websie L<http://www.arangodb.org/>
-
-=head1 LICENSE
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-
-=cut
-

0 comments on commit 4d93c79

Please sign in to comment.