Skip to content

Commit

Permalink
Item11808: perltidy, v20120714 which has been installed on foswiki.or…
Browse files Browse the repository at this point in the history
…g enforces a few new rules. Developers, PLEASE UPGRADE! This commit should help

I've perltidy'ed everything which had a TIDY file.
Also fixed all errors shown by perltidy (maybe still one encoding issue for Confluence)
I've fixed everything I saw with obvious perl mistakes though. Doubt anybody
will care, as most were due to a bogus Build::Contrib::createnewextension which
Sven fixed recently.

git-svn-id: http://svn.foswiki.org/trunk/PasswdUserContrib@15429 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
OlivierRaginel authored and OlivierRaginel committed Sep 26, 2012
1 parent c9e4031 commit a80d266
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/Foswiki/Contrib/PasswdUserContrib.pm
Expand Up @@ -15,7 +15,7 @@ package Foswiki::Contrib::PasswdUserContrib;

use strict;

our $VERSION = '$Rev$'; # version of *this file*.
our $VERSION = '$Rev$'; # version of *this file*.
our $RELEASE = '1.0.0';
our $SHORTDESCRIPTION = 'Use getpwnam to get passwords from /etc/passwd';

5 changes: 4 additions & 1 deletion lib/Foswiki/Contrib/PasswdUserContrib/build.pl
Expand Up @@ -12,13 +12,16 @@

# name of web to upload to
$build->{UPLOADTARGETWEB} = 'Extensions';

# Full URL of pub directory
$build->{UPLOADTARGETPUB} = 'http://foswiki.org/pub';

# Full URL of bin directory
$build->{UPLOADTARGETSCRIPT} = 'http://foswiki.org/bin';

# Script extension
$build->{UPLOADTARGETSUFFIX} = '';

# Build the target on the command line, or the default target
$build->build($build->{target});
$build->build( $build->{target} );

10 changes: 4 additions & 6 deletions lib/Foswiki/Users/PasswdUser.pm
Expand Up @@ -61,9 +61,7 @@ sub canFetchUsers {
my $class = shift;
setpwent();
my ($first) = getpwent();
return bless({
next => $first,
}, $class);
return bless( { next => $first, }, $class );
}

sub hasNext {
Expand All @@ -72,9 +70,9 @@ sub canFetchUsers {
}

sub next {
my $this = shift;
my $this = shift;
my $entry = $this->{next};
($this->{next}) = getpwent();
( $this->{next} ) = getpwent();
endpwent() unless $this->{next};
return $entry;
}
Expand All @@ -88,7 +86,7 @@ sub fetchPass {
my ( $this, $login ) = @_;

if ($login) {
my ($user, $passwd) = getpwnam($login);
my ( $user, $passwd ) = getpwnam($login);
return $passwd;
}
$this->{error} = 'No user';
Expand Down

0 comments on commit a80d266

Please sign in to comment.