Created
July 10, 2013 13:35
-
-
Save bokutin/5966324 to your computer and use it in GitHub Desktop.
これならsqitchで、schemaもfixtureも管理できそうだ。。。かなり理想的な気がする。
This file contains hidden or 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
use Modern::Perl; | |
use App::Sqitch; | |
use Graph::Easy; | |
sub run { | |
my $sqitch = App::Sqitch->new; | |
my $plan = $sqitch->plan; | |
my @changes = $plan->changes; | |
my $graph = Graph::Easy->new; | |
#for my $change (@changes) { | |
# $graph->add_node( name => $change->name ); | |
#} | |
for my $change (@changes) { | |
my @depends = $change->requires; | |
for my $depend (@depends) { | |
$graph->add_edge( $change->name, $depend->change ); | |
} | |
} | |
say $graph->as_ascii; | |
} | |
run(@ARGV); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment