mirror of
https://github.com/imapsync/imapsync.git
synced 2025-06-12 23:44:52 +02:00
36 lines
409 B
Perl
Executable file
36 lines
409 B
Perl
Executable file
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
sub foo {
|
|
bar();
|
|
baz(quux());
|
|
}
|
|
|
|
sub bar {
|
|
baz();
|
|
}
|
|
|
|
sub baz {
|
|
print "foo\n";
|
|
}
|
|
|
|
sub quux {
|
|
return 5;
|
|
}
|
|
|
|
my %calls;
|
|
|
|
while (<>) {
|
|
next unless my ($name) = /^sub (\S+)/;
|
|
while (<>) {
|
|
last if /^}/;
|
|
next unless my @funcs = /(\w+)\(/g;
|
|
push @{$calls{$name}}, @funcs;
|
|
}
|
|
}
|
|
|
|
use Data::Dumper;
|
|
print Dumper \%calls;
|
|
|