Skip to content

Commit

Permalink
Item8706: perltidy
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@7408 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
OlivierRaginel authored and OlivierRaginel committed May 14, 2010
1 parent 1fc8ec2 commit c18c4f6
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions core/lib/Foswiki/Configure/UI.pm
Expand Up @@ -49,6 +49,7 @@ sub new {
$this->{bin} = $1;
my @root = File::Spec->splitdir( $this->{bin} );
pop(@root);

# SMELL: Force a trailing separator - Linux and Windows are inconsistent
$this->{root} = File::Spec->catfile( @root, 'x' );
chop $this->{root};
Expand Down Expand Up @@ -134,7 +135,7 @@ sub setting {

my $data = join( ' ', @_ ) || ' ';

return CGI::Tr( {}, CGI::th({}, $key) . CGI::td({}, $data) );
return CGI::Tr( {}, CGI::th( {}, $key ) . CGI::td( {}, $data ) );
}

# encode a string to make a simplified unique ID useable
Expand Down Expand Up @@ -165,18 +166,16 @@ sub WARN {
$this->{item}->inc('warnings');
$totwarnings++;
return CGI::div( { class => 'foswikiAlert configureWarn' },
CGI::span( {}, CGI::strong({}, 'Warning: ') . join( "\n", @_ ) ) );
CGI::span( {}, CGI::strong( {}, 'Warning: ' ) . join( "\n", @_ ) ) );
}

# an error
sub ERROR {
my $this = shift;
$this->{item}->inc('errors');
$toterrors++;
return CGI::div(
{ class => 'foswikiAlert configureError' },
CGI::span( {}, CGI::strong({}, 'Error: ') . join( "\n", @_ ) )
);
return CGI::div( { class => 'foswikiAlert configureError' },
CGI::span( {}, CGI::strong( {}, 'Error: ' ) . join( "\n", @_ ) ) );
}

# Used in place of CGI::hidden, which is broken in some versions.
Expand All @@ -194,7 +193,7 @@ sub hidden {

# URL encode a value.
sub urlEncode {
my ($this, $value) = @_;
my ( $this, $value ) = @_;
$value =~ s/([^0-9a-zA-Z-_.:~!*'\/])/'%'.sprintf('%02x',ord($1))/ge;
return $value;
}
Expand Down Expand Up @@ -358,8 +357,16 @@ sub checkPerlModules {

sub checkPerlModule {
my ( $this, $module, $usage, $version ) = @_;
my $error = $this->checkPerlModules( 0, [ { name => $module, minimumVersion
=> $version, usage => $usage } ] );
my $error = $this->checkPerlModules(
0,
[
{
name => $module,
minimumVersion => $version,
usage => $usage
}
]
);
return $error;
}

Expand All @@ -377,7 +384,7 @@ sub getTemplateParser {

# skin can be set using url parameter 'skin'
my $skin = $Foswiki::query->param('skin') if $Foswiki::query;
$templateParser->setSkin( $skin ) if $skin;
$templateParser->setSkin($skin) if $skin;
}
return $templateParser;
}
Expand Down

0 comments on commit c18c4f6

Please sign in to comment.