Created
May 5, 2015 17:50
-
-
Save michaelrice/6a74a3ac79b239329bf3 to your computer and use it in GitHub Desktop.
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/env perl | |
| use warnings; | |
| use strict; | |
| my $file = "VimStub.java"; | |
| my @method_names = (); | |
| open FILE, $file or die $!; | |
| while(<FILE>) { | |
| if( $_ =~ /public \w+\b (.*)\(/g) { | |
| #print $1."\n"; | |
| if( grep { $1 eq $_} @method_names) { | |
| print "$1 duplicate found\n"; | |
| } | |
| else { | |
| push @method_names, $1; | |
| } | |
| } | |
| } | |
| print "found "; | |
| print scalar @method_names; | |
| print " methods in total\n"; | |
| close($file); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment