Permalink
Browse files

move declaration of variable in fromt of first usage

  • Loading branch information...
1 parent b113b10 commit 52a7d089ad25e0b9480bde76084c3342703527bf @moritz moritz committed Nov 2, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 bin/ufo
View
@@ -183,6 +183,7 @@ sub path-to-module-name($path) {
sub topo-sort(@modules, %dependencies) {
my @order;
+ my %color_of = @modules X=> 'not yet visited';
sub dfs-visit($module) {
%color_of{$module} = 'visited';
for %dependencies{$module}.list -> $used {
@@ -193,7 +194,6 @@ sub topo-sort(@modules, %dependencies) {
push @order, $module;
}
- my %color_of = @modules X=> 'not yet visited';
for @modules -> $module {
if %color_of{$module} eq 'not yet visited' {
dfs-visit($module);

0 comments on commit 52a7d08

Please sign in to comment.