Skip to content

Instantly share code, notes, and snippets.

@jest
Created May 30, 2011 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jest/998849 to your computer and use it in GitHub Desktop.
Save jest/998849 to your computer and use it in GitHub Desktop.
jEdit build-support props deps
/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