Created
May 30, 2011 12:38
-
-
Save jest/998849 to your computer and use it in GitHub Desktop.
jEdit build-support props deps
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
/usr/bin/perl <<'__END__' -- - plugin-build.xml|dot -Tpng -oplugin-build-deps.png | |
use 5.010; | |
use XML::Twig; | |
say q(digraph test {); | |
$t=XML::Twig->new(); | |
$t->parsefile(shift); | |
$r = $t->root; | |
for ($r->children(q(property))) { | |
if ($n1=$_->{att}{name}) { | |
($n=$n1)=~s/\./_/g; | |
my $val = $_->{att}{value}; | |
while ($val =~ /\$\{(.*?)\}/g) { | |
($v = $v1 = $1) =~ s/\./_/g; | |
say qq{$n [label="$n1"];}; | |
say qq{$v [label="$v1"];}; | |
say qq{$n -> $v [label="$val"];}; | |
} | |
} | |
} | |
say q(}); | |
__END__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment