Changeset 746


Ignore:
Timestamp:
11/16/08 20:35:21 (3 years ago)
Author:
OlivierRaginel
Message:

Item38: Removed backticks, removed 2 greps but lost one optimisation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/tools/gendocs.pl

    r14 r746  
    8484    return unless ( $file =~ /\.pm$/ ); 
    8585 
    86     my $count = `egrep -c '^=pod' $pmfile`; 
    87     return unless $count > 0; 
     86    # Babar: Removed optimisation on =pod as this parses the file twice 
    8887 
    8988    my $package = $dir; 
     
    110109    my %spec; 
    111110    my $line; 
     111    my $howSmelly = 0; 
    112112 
    113113    while( $line = <PMFILE>) { 
     114        $howSmelly++ if $Config->{smells} && $line =~ /(SMELL|FIXME|TODO)/; 
    114115        if( $line =~ /^=(begin|pod)/) { 
    115116            $inPod = 1; 
     
    152153    close(PMFILE); 
    153154 
    154     my $howSmelly = ""; 
    155155    if ( $Config->{smells} ) { 
    156         $howSmelly = `egrep -c '(SMELL|FIXME|TODO)' $pmfile`; 
    157         chomp($howSmelly); 
    158156        $smells += $howSmelly; 
    159157        if( $howSmelly) { 
Note: See TracChangeset for help on using the changeset viewer.