BioPerl

 view release on metacpan or  search on metacpan

maintenance/authors.pl  view on Meta::CPAN


#
# this is where the action is
#
sub findauthors {
    my ($filename) = $_;
    return unless ($filename =~ /\.PLS$/ or $filename =~ /\.p[ml]$/);
    return unless -e $filename;

    print "$filename\n" if $verbose;
    #local $/=undef;
    open my $F, '<', $filename or die "Could not read file '$filename': $!\n";
    while (my $line = <$F>) {
        #print $line;
        last if $line =~ /=head1 +AUTHOR/;
    }
    my $authorblock;
    while (my $line = <$F>) {
        last if $line =~ /=head/ and $line !~ /CONTRIBUTORS/;
        $authorblock .= $line;
    }
    close $F;
    return unless $authorblock;

    while ( $authorblock =~ /([\.\w_-]+@[\.a-z_-]+)/g) {
        #my $email = $1;
        #$email =~ //
        next if $AUTHORS{$1};
        #print "$filename\t$1\n";

        push @{$NEWAUTHORS{$1}}, $filename;
    }
}



=head1 OPTIONS

=over 3

=item B<-d | --dir> path

Overides the default directories to check by one directory 'path' and
all its subdirectories.

=item B<-a | --authorsfile>

path from working directory the AUTHORS file.

Redundant as this information could be had from --dir option butI am
feeling too lazy to change the code.

=cut

sub blankline {
    my ($file) = @_;
    return unless ($file =~ /\.PLS$/ or $file =~ /\.p[ml]$/);
    return unless -e $file;

    open my $F, '<', $file or warn "Could not read file '$file': $!\n" && return;
    local $/ = "";
    while (my $line = <$F>) {
        print "$file: +|$1|\n"  if $line =~ /[ \t]\n(=[a-z][^\n]+$)/m and $verbose;
        print "$file: ++|$1|\n" if $line =~ /\w\n(=[a-z][^\n]+$)/m    and $verbose;
        print "$file:|$1|+\n"   if $line =~ /(^=[a-z][^\n]+)\n[\t ]/m;
        #print "$file:|$1|++\n" if /(^=[^\n]+)\n\w/m;
    }
    close $F;
}

__END__

=item B<-v | --verbose>

Show the progress through files during the POD checking.

=item B<-? | -h  | --help>

This help text.

=back

=head1 FEEDBACK

=head2 Mailing Lists

User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to
the Bioperl mailing list.  Your participation is much appreciated.

  bioperl-l@bioperl.org                  - General discussion
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists

=head2 Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track
of the bugs and their resolution. Bug reports can be submitted via the
web:

  https://github.com/bioperl/bioperl-live/issues

=head1 AUTHOR - Heikki Lehvaslaiho

Email heikki-at-bioperl-dot-org

=cut


# find . -name '*.pm' -print | xargs  perl -e '$/=""; while (<>) {$n = $1 if /^package\s+([\w:]+)/; print "$n:|$1|"  if  /(\s\s^=[^\n]+$)/m ; }'  ;

# find . -name '*.pm' -print | xargs  perl -e '$/=""; while (<>) {$n = $1 if /^package\s+([\w:]+)/; print "$n:|$1|\n"  if /(^=[^\n]+\n[\t ])/m ; }'  ;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 3.800 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )