#!/usr/bin/env perl use strict; use CGI qw/:standard/; use File::Spec::Functions; use File::Basename; use lib (dirname($0).'/../lib'); use File::Slurp; use vCard; my $q = new CGI; my $committerStoreFolder = '/usr/local/apache2/store/committer'; my $vc = vCard->new(Store => $committerStoreFolder); my @srcCriteria = ( [ '_userid', 'EMAIL;TYPE=INTERNET', 'User ID', '\@apache.org' ], [ '_name', 'N', 'Name', '' ], [ '_email', 'EMAIL;TYPE=INTERNET,PREF', 'Email address', '' ], ); print header; my @criteria; print < ASF Asylum Committer Search
The Apache Software Foundation

ASF Asylum Committer Search

Search criteria being used are:

    EOF for my $i (0 .. $#srcCriteria) { if ((my $src = $q->param($srcCriteria[$i][0]))) { print <$srcCriteria[$i][2] containing '$src' EOF my @crit = [ $srcCriteria[$i][1], $src.$srcCriteria[$i][3] ]; push(@criteria, [ $srcCriteria[$i][1], $src.$srcCriteria[$i][3] ]); } } print <

    Results

    EOF my $matches = 0; if (opendir(DIR, $committerStoreFolder)) { while ((my $f = readdir(DIR))) { next unless $f =~ /\.vcf$/; my $fn = catfile($committerStoreFolder, $f); my $txt = read_file($fn); my $match = 0; for my $i (0 .. $#criteria) { $match++ if ($txt =~ /$criteria[$i][0]:.*$criteria[$i][1].*/i); } next unless $match > $#criteria; $f =~ s/\.vcf//; $matches++; $vc->readParseFile($f); $vc->printLink(); } closedir(DIR); } print <Total of $matches match(es)



Back to Committers Area

EOF print end_html;