File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ sub ProcessFile
213213 if ($self -> {' _sState' } eq ' NORMAL' )
214214 {
215215 $logger -> debug(" We are in state: NORMAL" );
216- if ($line =~ / ^\s *sub\s *(. *)/ ) { $self -> _ChangeState(' METHOD' ); }
216+ if ($line =~ / ^\s *sub\s +([ \w ]+) / and $line =~ / ^ \s *sub \s +([ \D ][ \w ] *)/ ) { $self -> _ChangeState(' METHOD' ); }
217217 elsif ($line =~ / ^\s *#\*\*\s *\@ / ) { $self -> _ChangeState(' DOXYGEN' ); }
218218 elsif ($line =~ / ^=.*/ ) { $self -> _ChangeState(' POD' ); }
219219 }
@@ -240,7 +240,7 @@ sub ProcessFile
240240 {
241241 # If this comment block is right next to a subroutine, lets make sure we
242242 # handle that condition
243- if ($line =~ / ^\s *sub\s *(. *)/ ) { $self -> _ChangeState(' METHOD' ); }
243+ if ($line =~ / ^\s *sub\s +([ \w ]+) / and $line =~ / ^ \s *sub \s +([ \D ][ \w ] *)/ ) { $self -> _ChangeState(' METHOD' ); }
244244 }
245245 }
246246 }
@@ -703,7 +703,7 @@ sub _ProcessPerlMethod
703703
704704 my $sClassName = $self -> {' _sCurrentClass' };
705705
706- if ($line =~ / ^\s *sub\s +(.* )/ )
706+ if ($line =~ / ^\s *sub\s +([ \w ]+) / and $line =~ / ^ \s *sub \s +([ \D ][ \w ]* )/ )
707707 {
708708 # We should keep track of the order in which the methods were written in the code so we can print
709709 # them out in the same order
You can’t perform that action at this time.
0 commit comments