Skip to content

Commit

Permalink
neta
Browse files Browse the repository at this point in the history
  • Loading branch information
karupanerura committed Jul 8, 2014
0 parents commit caad49b
Show file tree
Hide file tree
Showing 11 changed files with 627 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/.build/
/_build/
/Build
/Build.bat
/blib
/Makefile

/carton.lock
/.carton/
/local/

nytprof.out
nytprof/

cover_db/

*.bak
*.old
*~
*.swp
*.o
*.obj

!LICENSE

/_build_params

MYMETA.*

/Aniki-*
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: perl
perl:
- "5.12"
- "5.14"
- "5.16"
- "5.18"

12 changes: 12 additions & 0 deletions Build.PL
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# =========================================================================
# THIS FILE IS AUTOMATICALLY GENERATED BY MINILLA.
# DO NOT EDIT DIRECTLY.
# =========================================================================

use 5.008_001;
use strict;

use Module::Build::Tiny 0.035;

Build_PL();

6 changes: 6 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Revision history for Perl extension Aniki

{{$NEXT}}

- original version

378 changes: 378 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

57 changes: 57 additions & 0 deletions META.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"abstract" : "It's new $module",
"author" : [
"karupanerura <karupa@cpan.org>"
],
"dynamic_config" : 0,
"generated_by" : "Minilla/v2.1.1, CPAN::Meta::Converter version 2.141520",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : "2"
},
"name" : "Aniki",
"no_index" : {
"directory" : [
"t",
"xt",
"inc",
"share",
"eg",
"examples",
"author",
"builder"
]
},
"prereqs" : {
"configure" : {
"requires" : {
"Module::Build::Tiny" : "0.035"
}
},
"develop" : {
"requires" : {
"Test::CPAN::Meta" : "0",
"Test::MinimumVersion::Fast" : "0.04",
"Test::PAUSE::Permissions" : "0.04",
"Test::Pod" : "1.41",
"Test::Spellunker" : "v0.2.7"
}
},
"runtime" : {
"requires" : {
"perl" : "5.008001"
}
},
"test" : {
"requires" : {
"Test::More" : "0.98"
}
}
},
"release_status" : "unstable",
"version" : "0.01",
"x_authority" : "cpan:KARUPA"
}
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# NAME

Aniki - It's new $module

# SYNOPSIS

use Aniki;

# DESCRIPTION

Aniki is ...

# LICENSE

Copyright (C) karupanerura.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

# AUTHOR

karupanerura <karupa@cpan.org>
6 changes: 6 additions & 0 deletions cpanfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
requires 'perl', '5.008001';

on 'test' => sub {
requires 'Test::More', '0.98';
};

94 changes: 94 additions & 0 deletions lib/Aniki.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
use 5.014002;
package Aniki 0.01 {
# TBD #
}
1;
__END__
=encoding utf-8
=head1 NAME
Aniki - The ORM as our great brother.
=head1 SYNOPSIS
use 5.014002;
package MyProj::DB::Schema {
use DBIx::Schema::DSL;
create_table 'module' => columns {
integer 'id', primary_key, auto_increment;
varchar 'name';
integer 'author_id';
add_index 'author_id_idx' => ['author_id'];
belongs_to 'author';
};
create_table 'author' => columns {
integer 'id', primary_key, auto_increment;
varchar 'name', unique;
has_many 'module';
};
};
package MyProj::DB {
use parent qw/Aniki/;
__PACKAGE__->load_schema('MyProj::DB::Schema');
};
package main {
my $db = MyProj::DB->new(...);
$db->schema->add_table(name => $_) for $db->schema->get_tables;
$db->insert(author => { name => 'SONGMU' });
my $author_id = $db->last_insert_id;
$db->insert(module => {
name => 'DBIx::Schema::DSL',
author_id => $author_id,
});
$db->insert(module => {
name => 'Riji',
author_id => $author_id,
});
my $module_id = $db->last_insert_id;
my ($module) = $db->select(module => {
id => $module_id,
}, {
limit => 1,
});
$module->name; ## Riji
$module->author->name; ## SONGMU
my ($author) = $db->select(author => {
name => 'SONGMU',
}, {
limit => 1,
relay => [qw/module/],
});
$author->name; ## SONGMU
$_->name for $author->modules; ## DBIx::Schema::DSL, Riji
};
1;
=head1 DESCRIPTION
Aniki is ...
=head1 LICENSE
Copyright (C) karupanerura.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=head1 AUTHOR
karupanerura E<lt>karupa@cpan.orgE<gt>
=cut
6 changes: 6 additions & 0 deletions minil.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name = "Aniki"
# badges = ["travis"]
authority="cpan:KARUPA"

module_maker="ModuleBuildTiny"

9 changes: 9 additions & 0 deletions t/00_compile.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use strict;
use Test::More 0.98;

use_ok $_ for qw(
Aniki
);

done_testing;

0 comments on commit caad49b

Please sign in to comment.