From a80d2663e6b3c80578bf5602640074054e867570 Mon Sep 17 00:00:00 2001 From: OlivierRaginel Date: Wed, 26 Sep 2012 01:37:12 +0000 Subject: [PATCH] Item11808: perltidy, v20120714 which has been installed on foswiki.org 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 --- lib/Foswiki/Contrib/PasswdUserContrib.pm | 2 +- lib/Foswiki/Contrib/PasswdUserContrib/build.pl | 5 ++++- lib/Foswiki/Users/PasswdUser.pm | 10 ++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/Foswiki/Contrib/PasswdUserContrib.pm b/lib/Foswiki/Contrib/PasswdUserContrib.pm index 0bcf4e0..de7a950 100644 --- a/lib/Foswiki/Contrib/PasswdUserContrib.pm +++ b/lib/Foswiki/Contrib/PasswdUserContrib.pm @@ -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'; diff --git a/lib/Foswiki/Contrib/PasswdUserContrib/build.pl b/lib/Foswiki/Contrib/PasswdUserContrib/build.pl index afc8e4e..5c24e84 100755 --- a/lib/Foswiki/Contrib/PasswdUserContrib/build.pl +++ b/lib/Foswiki/Contrib/PasswdUserContrib/build.pl @@ -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} ); diff --git a/lib/Foswiki/Users/PasswdUser.pm b/lib/Foswiki/Users/PasswdUser.pm index fa2ee9d..edfed86 100644 --- a/lib/Foswiki/Users/PasswdUser.pm +++ b/lib/Foswiki/Users/PasswdUser.pm @@ -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 { @@ -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; } @@ -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';