summaryrefslogtreecommitdiff
path: root/perl/Wallet/Object/Base.pm
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2007-12-05 01:34:39 +0000
committerRuss Allbery <rra@stanford.edu>2007-12-05 01:34:39 +0000
commit5ad61b6ecd14adffa013ef5b0b8c2b8da8cca03b (patch)
treefa3cc53424cb31c6d4306ca2ccb438e0e244806f /perl/Wallet/Object/Base.pm
parentc74e1824fe878d6289a6a0fa3b777d5c425e0a44 (diff)
Coding style improvements.
Diffstat (limited to 'perl/Wallet/Object/Base.pm')
-rw-r--r--perl/Wallet/Object/Base.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/perl/Wallet/Object/Base.pm b/perl/Wallet/Object/Base.pm
index bc9fc1e..ff6f008 100644
--- a/perl/Wallet/Object/Base.pm
+++ b/perl/Wallet/Object/Base.pm
@@ -23,7 +23,7 @@ use Wallet::ACL;
# This version should be increased on any code change to this module. Always
# use two digits for the minor version with a leading zero if necessary so
# that it will sort properly.
-$VERSION = '0.02';
+$VERSION = '0.03';
##############################################################################
# Constructors
@@ -357,10 +357,8 @@ sub flag_check {
$self->error ("cannot check flag $flag for ${type}:${name}: $@");
$dbh->rollback;
return;
- } elsif ($value) {
- return 1;
} else {
- return 0;
+ return ($value) ? 1 : 0;
}
}
@@ -573,7 +571,7 @@ sub show {
# Format the results. We use a hack to insert the flags before the first
# trace field since they're not a field in the object in their own right.
- for (my $i = 0; $i < @data; $i++) {
+ for my $i (0 .. $#data) {
if ($attrs[$i][0] eq 'ob_created_by') {
my @flags = $self->flag_list;
if (not @flags and $self->error) {