diff options
author | Russ Allbery <rra@stanford.edu> | 2010-01-19 22:48:01 -0800 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2010-01-19 22:48:01 -0800 |
commit | d684049761db4eb88cd936c530196ea89a524c07 (patch) | |
tree | a7be768921000e125b7b0989f75739509c3bde6b /perl/Wallet/Object/Base.pm | |
parent | b7aedd9b7290d51dc5e46c4b123cd5f0f080f9c7 (diff) |
Coding style fixes for Perl wallet code
Strip trailing whitespace, convert tabs to spaces, add newlines to
exceptions, and remove a few stray blank lines and a few other minor
coding style oddities. Make the SQL style consistent.
Diffstat (limited to 'perl/Wallet/Object/Base.pm')
-rw-r--r-- | perl/Wallet/Object/Base.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/perl/Wallet/Object/Base.pm b/perl/Wallet/Object/Base.pm index f2568eb..fea0320 100644 --- a/perl/Wallet/Object/Base.pm +++ b/perl/Wallet/Object/Base.pm @@ -445,7 +445,7 @@ sub flag_set { # History ############################################################################## -# Expand a given ACL id to add its name, for readability. Returns the +# Expand a given ACL id to add its name, for readability. Returns the # original id alone if there was a problem finding the name. sub format_acl_id { my ($self, $id) = @_; @@ -455,7 +455,7 @@ sub format_acl_id { my $sth = $self->{dbh}->prepare ($sql); $sth->execute ($id); if (my @ref = $sth->fetchrow_array) { - $name = $ref[0] . " ($id)"; + $name = $ref[0] . " ($id)"; } return $name; @@ -492,11 +492,11 @@ sub history { } elsif (defined ($new)) { $output .= "add $new to attribute $attr"; } - } elsif ($data[0] eq 'set' - and ($data[1] eq 'owner' or $data[1] =~ /^acl_/)) { + } elsif ($data[0] eq 'set' + and ($data[1] eq 'owner' or $data[1] =~ /^acl_/)) { my $field = $data[1]; - $old = $self->format_acl_id ($old) if defined ($old); - $new = $self->format_acl_id ($new) if defined ($new); + $old = $self->format_acl_id ($old) if defined ($old); + $new = $self->format_acl_id ($new) if defined ($new); if (defined ($old) and defined ($new)) { $output .= "set $field to $new (was $old)"; } elsif (defined ($new)) { |