diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-03-08 18:19:14 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-03-08 18:19:14 +0000 |
commit | c487bc66e10c419fc1a1bca0d41fece568cb0589 (patch) | |
tree | 618925df62ac8873cde47a3933a1c129c1307a4e | |
parent | b6be28bd242c03fe8a0a679af1fe78d65f9a9709 (diff) | |
download | perl_checker-c487bc66e10c419fc1a1bca0d41fece568cb0589.tar perl_checker-c487bc66e10c419fc1a1bca0d41fece568cb0589.tar.gz perl_checker-c487bc66e10c419fc1a1bca0d41fece568cb0589.tar.bz2 perl_checker-c487bc66e10c419fc1a1bca0d41fece568cb0589.tar.xz perl_checker-c487bc66e10c419fc1a1bca0d41fece568cb0589.zip |
(parse_pm) handle functions without spacing before opening "{"
eg: "sub set_color_fg{"
-rwxr-xr-x | fake_packages/gen.pl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fake_packages/gen.pl b/fake_packages/gen.pl index 9d09a5b..b65cd5d 100755 --- a/fake_packages/gen.pl +++ b/fake_packages/gen.pl @@ -112,6 +112,8 @@ sub parse_pm { # forget it } elsif (/^sub\s*(\S*)/) { $name = $1; + # handle functions without spacing before opening "{" (eg: "sub set_color_fg{") + $name =~ s/{$//; $l{$current_package}{$name} = [] if !defined($l{$current_package}{$name}); $state = 'waiting_for_param'; } elsif ($state eq 'waiting_for_param' && /=\s*\@_/) { |