forked from karupanerura/Aniki
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit caad49b
Showing
11 changed files
with
627 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Revision history for Perl extension Aniki | ||
|
||
{{$NEXT}} | ||
|
||
- original version | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name = "Aniki" | ||
# badges = ["travis"] | ||
authority="cpan:KARUPA" | ||
|
||
module_maker="ModuleBuildTiny" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
|