From 5ad61b6ecd14adffa013ef5b0b8c2b8da8cca03b Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 5 Dec 2007 01:34:39 +0000 Subject: Coding style improvements. --- perl/Wallet/Object/Keytab.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'perl/Wallet/Object/Keytab.pm') diff --git a/perl/Wallet/Object/Keytab.pm b/perl/Wallet/Object/Keytab.pm index c2f66d4..7aeb5da 100644 --- a/perl/Wallet/Object/Keytab.pm +++ b/perl/Wallet/Object/Keytab.pm @@ -24,7 +24,7 @@ use Wallet::Object::Base; # 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'; ############################################################################## # kadmin Interaction @@ -36,10 +36,7 @@ $VERSION = '0.02'; # realm information here. sub valid_principal { my ($self, $principal) = @_; - if ($principal !~ m,^[\w-]+(/[\w_-]+)?\z,) { - return undef; - } - return 1; + return scalar ($principal =~ m,^[\w-]+(/[\w_-]+)?\z,); } # Run a kadmin command and capture the output. Returns the output, either as -- cgit v1.2.3