diff options
author | Perl Tidy <perltidy@bugzilla.org> | 2018-12-05 21:38:52 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-12-05 23:49:08 +0100 |
commit | 8ec8da0491ad89604700b3e29a227966f6d84ba1 (patch) | |
tree | 9d270f173330ca19700e0ba9f2ee931300646de1 /sanitycheck.pl | |
parent | a7bb5a65b71644d9efce5fed783ed545b9336548 (diff) | |
download | bugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.gz bugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.xz |
no bug - reformat all the code using the new perltidy rules
Diffstat (limited to 'sanitycheck.pl')
-rwxr-xr-x | sanitycheck.pl | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/sanitycheck.pl b/sanitycheck.pl index bf3680bd6..d691481fa 100755 --- a/sanitycheck.pl +++ b/sanitycheck.pl @@ -21,23 +21,25 @@ use Bugzilla::Mailer; use Getopt::Long; use Pod::Usage; -my $verbose = 0; # Return all comments if true, else errors only. +my $verbose = 0; # Return all comments if true, else errors only. my $login = ''; # Login name of the user which is used to call sanitycheck.cgi. -my $help = 0; # Has user asked for help on this script? +my $help = 0; # Has user asked for help on this script? -my $result = GetOptions('verbose' => \$verbose, - 'login=s' => \$login, - 'help|h|?' => \$help); +my $result = GetOptions( + 'verbose' => \$verbose, + 'login=s' => \$login, + 'help|h|?' => \$help +); pod2usage({-verbose => 1, -exitval => 1}) if $help; # Be sure a login name if given. $login || ThrowUserError('invalid_username'); -my $user = new Bugzilla::User({ name => $login }) - || ThrowUserError('invalid_username', { name => $login }); +my $user = new Bugzilla::User({name => $login}) + || ThrowUserError('invalid_username', {name => $login}); -my $cgi = Bugzilla->cgi; +my $cgi = Bugzilla->cgi; my $template = Bugzilla->template; # Authenticate using this user account. @@ -50,16 +52,16 @@ require 'sanitycheck.cgi'; # Now it's time to send an email to the user if there is something to notify. if ($cgi->param('output')) { - my $message; - my $vars = {}; - $vars->{'addressee'} = $user->email; - $vars->{'output'} = $cgi->param('output'); - $vars->{'error_found'} = $cgi->param('error_found') ? 1 : 0; + my $message; + my $vars = {}; + $vars->{'addressee'} = $user->email; + $vars->{'output'} = $cgi->param('output'); + $vars->{'error_found'} = $cgi->param('error_found') ? 1 : 0; - $template->process('email/sanitycheck.txt.tmpl', $vars, \$message) - || ThrowTemplateError($template->error()); + $template->process('email/sanitycheck.txt.tmpl', $vars, \$message) + || ThrowTemplateError($template->error()); - MessageToMTA($message); + MessageToMTA($message); } |