Commit 6cc7190d authored by Xavier Guimard's avatar Xavier Guimard

Tidy

parent 9e12c942
......@@ -28,10 +28,10 @@ sub parse {
unless ( $rest =~ s/^\s*\bthen\b\s*// ) {
die('Bad combination: missing "then"');
}
unless( $rest =~ /(.*?)\s*\belse\b\s*(.*)$/ ) {
unless ( $rest =~ /(.*?)\s*\belse\b\s*(.*)$/ ) {
die('Bad combination: missing "else"');
}
($then,$else)=($1,$2);
( $then, $else ) = ( $1, $2 );
unless ($then) {
die('Bad combination: missing "then" content');
}
......@@ -46,7 +46,7 @@ sub parse {
die('Bad combination: bad then or else');
}
return sub {
my ( $req ) = @_;
my ($req) = @_;
return ( $cond->($req) ? $then : $else->($req) );
};
}
......@@ -103,7 +103,10 @@ sub parseBlock {
die "Bad expression: $expr";
}
my @res = ( $1, $2 || $1 );
@res = ($self->parseMod( $moduleList, 0, $res[0]),$self->parseMod( $moduleList, 1, $res[1]));
@res = (
$self->parseMod( $moduleList, 0, $res[0] ),
$self->parseMod( $moduleList, 1, $res[1] )
);
return \@res;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment