Skip to content

Commit

Permalink
Remove extraneous semicolons
Browse files Browse the repository at this point in the history
They confuse my editor
  • Loading branch information
jaredj committed Nov 11, 2014
1 parent 4feccf8 commit 3ffee33
Show file tree
Hide file tree
Showing 36 changed files with 168 additions and 168 deletions.
24 changes: 12 additions & 12 deletions bin/install_deps.pl
Expand Up @@ -40,7 +40,7 @@
foreach ( @$apps ) {
my $name = $_->{app} or die 'missing app name';
install_app( $name, $_->{info} );
};
}

foreach ( get_perl_modules() ) {
#print Dumper($_);
Expand Down Expand Up @@ -78,7 +78,7 @@ sub get_perl_modules {
return get_perl_modules_from_Makefile_PL();
};
die "unable to find module list. Run this script in the dist dir\n";
};
}

sub get_perl_modules_from_Makefile_PL {
my $fh = new IO::File 'Makefile.PL', 'r'
Expand All @@ -102,7 +102,7 @@ sub get_perl_modules_from_Makefile_PL {
}
$fh->close;
return @modules;
};
}

sub get_perl_modules_from_ini {
my $fh = new IO::File 'dist.ini', 'r'
Expand All @@ -127,7 +127,7 @@ sub get_perl_modules_from_ini {
$fh->close;
#print Dumper(\@modules);
return @modules;
};
}

sub install_app {
my ( $app, $info) = @_;
Expand All @@ -142,7 +142,7 @@ sub install_app {
install_app_linux( $app, $info );
};

};
}

sub install_app_darwin {
my ($app, $info ) = @_;
Expand Down Expand Up @@ -181,7 +181,7 @@ sub install_app_freebsd {
system "make install clean"
and warn "'make install clean' failed for port $app\n";
};
};
}

sub install_app_linux {
my ($app, $info ) = @_;
Expand All @@ -197,7 +197,7 @@ sub install_app_linux {
else {
warn "no Linux package manager detected\n";
};
};
}


sub install_module {
Expand All @@ -220,7 +220,7 @@ sub install_module {
return 1 if ! $EVAL_ERROR;

install_module_cpan($module, $version);
};
}

sub install_module_cpan {

Expand Down Expand Up @@ -309,7 +309,7 @@ sub install_module_linux {
return install_module_linux_apt($module, $info);
}
warn "no Linux package manager detected\n";
};
}

sub install_module_linux_yum {
my ($module, $info) = @_;
Expand All @@ -322,7 +322,7 @@ sub install_module_linux_yum {
$package =~ s/::/-/g;
};
system "/usr/bin/yum -y install $package";
};
}

sub install_module_linux_apt {
my ($module, $info) = @_;
Expand All @@ -335,7 +335,7 @@ sub install_module_linux_apt {
$package =~ s/::/-/g;
};
system "/usr/bin/apt-get -y install $package";
};
}

sub get_cpan_config {

Expand Down Expand Up @@ -397,4 +397,4 @@ sub name_overrides {
my ($match) = grep { $_->{module} eq $mod } @modules;
return $match if $match;
return { module=>$mod, info => { } };
};
}
4 changes: 2 additions & 2 deletions lib/Qpsmtpd/Base.pm
Expand Up @@ -6,7 +6,7 @@ use Net::IP;

sub new {
return bless {}, shift;
};
}

sub tildeexp {
my ($self, $path) = @_;
Expand Down Expand Up @@ -44,7 +44,7 @@ sub is_ipv6 {
my ($self, $ip) = @_;
return if !$ip;
return Net::IP::ip_is_ipv6($ip);
};
}

sub get_resolver {
my ($self, %args) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Qpsmtpd/Plugin.pm
Expand Up @@ -276,7 +276,7 @@ sub store_auth_results {
my $ar = join('; ', $auths, $result);
$self->log(LOGDEBUG, "auth-results: $ar");
$self->qp->connection->notes('authentication_results', $ar );
};
}

sub is_immune {
my $self = shift;
Expand Down
6 changes: 3 additions & 3 deletions log/log2sql
Expand Up @@ -552,7 +552,7 @@ sub get_config {
$values{$key} = $val;
};
return %values;
};
}

sub get_config_contents {
my $name = shift;
Expand All @@ -569,7 +569,7 @@ sub get_config_contents {
my @contents = <$fh>;
return @contents;
};
};
}

sub check_plugins_table {
my $rows = exec_query( 'SELECT COUNT(*) FROM plugin');
Expand All @@ -591,7 +591,7 @@ sub check_plugins_table {
exec_query($aq, [$id, $alias]);
};
};
};
}

sub exec_query {
my $query = shift;
Expand Down
2 changes: 1 addition & 1 deletion log/summarize
Expand Up @@ -100,7 +100,7 @@ sub get_default_field_widths {
);

return %widths;
};
}

sub handle_plugin {
my ($message, $plugin, $pid, $line) = @_;
Expand Down
4 changes: 2 additions & 2 deletions plugins/auth/auth_vpopmaild
Expand Up @@ -81,7 +81,7 @@ sub get_response {
};

return $response;
};
}

sub get_socket {
my ($self) = @_;
Expand All @@ -99,7 +99,7 @@ sub get_socket {
return;
};
return $socket;
};
}

__END__
Expand Down
2 changes: 1 addition & 1 deletion plugins/earlytalker
Expand Up @@ -138,7 +138,7 @@ sub wait_length {
return $self->connection->notes('earlytalker_wait');
}
return $self->{_args}{wait};
};
}

sub apr_connect_handler {
my ($self, $transaction) = @_;
Expand Down
4 changes: 2 additions & 2 deletions plugins/headers
Expand Up @@ -168,7 +168,7 @@ sub has_required_headers {
$self->log(LOGINFO, "fail, no $h header" );
}
return $errors;
};
}

sub has_singular_headers {
my ($self, $header) = @_;
Expand All @@ -187,7 +187,7 @@ sub has_singular_headers {
$self->log(LOGINFO, "fail, too many $h headers" );
}
return $errors;
};
}

sub invalid_date_range {
my $self = shift;
Expand Down
18 changes: 9 additions & 9 deletions plugins/karma
Expand Up @@ -347,11 +347,11 @@ sub from_handler {
if ( $sender->host && ".$tld" eq substr($sender->host,-$len,$len) ) {
$self->log(LOGINFO, "penalizing .$tld envelope sender");
$self->adjust_karma(-$score);
};
};
}
}

return DECLINED;
};
}

sub rcpt_handler {
my ($self,$transaction, $recipient, %args) = @_;
Expand All @@ -365,7 +365,7 @@ sub rcpt_handler {
if ( $count > 1 ) {
$self->log(LOGINFO, "recipients c: $count ($recipient)");
$self->connection->notes('recipient_count', $count);
};
}

return DECLINED if $self->is_immune();

Expand All @@ -379,13 +379,13 @@ sub rcpt_handler {
if ( $history > 0 ) {
$self->log(LOGINFO, "info, good history");
return DECLINED;
};
}

my $karma = $self->connection->notes('karma');
if ( $karma > 0 ) {
$self->log(LOGINFO, "info, good connection");
return DECLINED;
};
}

# limit # of recipients if host has negative or unknown karma
return DENY, "too many recipients for karma $karma (h: $history)";
Expand All @@ -401,7 +401,7 @@ sub data_handler {
my $karma = $self->connection->notes('karma');
if ( $karma < -4 ) { # bad karma
return $self->get_reject("very bad karma: $karma");
};
}

return DECLINED;
}
Expand Down Expand Up @@ -461,8 +461,8 @@ sub illegal_envelope_format {
if ( uc substr($addr,0,6) ne 'FROM:<' && uc substr($addr,0,4) ne 'TO:<' ) {
$self->log(LOGINFO, "illegal envelope address format: $addr" );
$self->adjust_karma(-2);
};
};
}
}

sub parse_db_record {
my ($self, $value) = @_;
Expand Down
2 changes: 1 addition & 1 deletion plugins/loadcheck
Expand Up @@ -154,5 +154,5 @@ sub get_load_method {

$self->log(LOGERROR, "unable to acquire system load");
return;
};
}

2 changes: 1 addition & 1 deletion qpsmtpd-forkserver
Expand Up @@ -235,7 +235,7 @@ $SIG{HUP} = sub {
$qpsmtpd->load_plugins;
$qpsmtpd->spool_dir;
$qpsmtpd->size_threshold;
};
}

while (1) {
REAPER();
Expand Down
4 changes: 2 additions & 2 deletions t/packaging.t
Expand Up @@ -16,7 +16,7 @@ sub get_qp_version {
my ($ver_line) = grep { $_ =~ /^our \$VERSION/ } @$rvfile;
my ($ver) = $ver_line =~ /['"]([0-9\.]+)['"]/;
return $ver;
};
}

sub get_rpm_version {
my $rvfile = get_file_contents('packaging/rpm/VERSION')
Expand All @@ -33,4 +33,4 @@ sub get_file_contents {
};
my @r = <$fh>;
return \@r;
};
}
4 changes: 2 additions & 2 deletions t/plugin_tests/auth/auth_checkpassword
Expand Up @@ -10,12 +10,12 @@ sub register_tests {
if ( ! $vpopdir ) {
warn "skipping tests, vpopmail not installed\n";
return;
};
}

if ( ! -d "$vpopdir/domains/example.com" ) {
warn "skipping tests, no example users set up.\n";
return;
};
}

$self->register_test("test_auth_checkpassword");
}
Expand Down
2 changes: 1 addition & 1 deletion t/plugin_tests/auth/auth_vpopmail
Expand Up @@ -25,7 +25,7 @@ sub test_auth_vpopmail {
warn "vpopmail plugin not configured\n";
foreach ( 0..2) { ok( 1, "skipped") };
return;
};
}

my ($tran, $ret, $note, $u, $r, $p, $a );
$tran = $self->qp->transaction;
Expand Down
8 changes: 4 additions & 4 deletions t/plugin_tests/auth/auth_vpopmail_sql
Expand Up @@ -10,7 +10,7 @@ sub register_tests {
if ( $@ ) {
warn "skipping auth_vpopmail_sql tests, is DBI installed?\n";
return;
};
}
$self->register_test("auth_vpopmail_sql");
}

Expand All @@ -21,7 +21,7 @@ sub auth_vpopmail_sql {
my $dbh = $self->get_db_handle() or do {
foreach ( 0..2 ) {
ok( 1, "skipped (no DB)" );
};
}
return;
};
ok( $dbh, "auth_vpopmail_sql, got a dbh" );
Expand All @@ -30,9 +30,9 @@ sub auth_vpopmail_sql {
if ( ! $vuser || ! $vuser->{pw_passwd} ) {
foreach ( 0..1 ) {
ok( 1, "no example.com domain" );
};
}
return;
};
}
ok( ref $vuser, "found example.com domain" );

ok( $self->auth_vmysql(
Expand Down
8 changes: 4 additions & 4 deletions t/plugin_tests/badmailfrom
Expand Up @@ -35,7 +35,7 @@ sub test_badmailfrom_is_immune_sender {
$address = Qpsmtpd::Address->new( '<matt@example.com>' );
$transaction->sender($address);
ok( ! $self->is_immune_sender( $transaction->sender, ['bad@example.com'] ), "false");
};
}

sub test_badmailfrom_hook_mail {
my $self = shift;
Expand All @@ -60,7 +60,7 @@ sub test_badmailfrom_hook_mail {
($r, $err) = $self->hook_mail( $transaction, $address );
cmp_ok( $r, '==', DENY, "hook_mail rc");
cmp_ok( $err, 'eq', 'Yer a spammin bastert', "custom reason");
};
}

sub test_badmailfrom_match {
my $self = shift;
Expand All @@ -87,13 +87,13 @@ sub test_badmailfrom_match {

ok( ! $self->is_match( 'matt@test.net', 'test.not$', 'tnpi.net' ),
"pattern non-match");
};
}

sub _reset_connection_flags {
my $self = shift;
$self->qp->connection->relay_client(0);
$self->qp->connection->notes('whitelisthost', 0);
$self->connection->notes('naughty',0);
$self->connection->notes('rejected', 0);
};
}

2 changes: 1 addition & 1 deletion t/plugin_tests/badmailfromto
Expand Up @@ -30,5 +30,5 @@ sub test_badmailfromto_is_sender_immune {

$transaction->sender( Qpsmtpd::Address->new( '<matt@example.com>' ) );
ok( ! $self->is_sender_immune( $transaction->sender, ['bad@example.com'] ), "false");
};
}

0 comments on commit 3ffee33

Please sign in to comment.