summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-08 18:19:14 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-08 18:19:14 +0000
commitc487bc66e10c419fc1a1bca0d41fece568cb0589 (patch)
tree618925df62ac8873cde47a3933a1c129c1307a4e
parentb6be28bd242c03fe8a0a679af1fe78d65f9a9709 (diff)
downloadperl_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-xfake_packages/gen.pl2
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*\@_/) {