parent
fd337a2110
commit
a7a2a425a5
|
@ -19,9 +19,10 @@ sub perlExpr {
|
||||||
$cpt->reval("BEGIN { 'warnings'->unimport; } $val");
|
$cpt->reval("BEGIN { 'warnings'->unimport; } $val");
|
||||||
my $err = join(
|
my $err = join(
|
||||||
'',
|
'',
|
||||||
grep( { $_ =~ /Undefined subroutine/ ? () : $_; } split( /\n/, $@, 0 ) )
|
grep( { $_ =~ /(?:Undefined subroutine|Devel::StackTrace)/ ? () : $_; }
|
||||||
|
split( /\n/, $@, 0 ) )
|
||||||
);
|
);
|
||||||
return $err ? ( 0, "__badExpression__: $err" ) : 1;
|
return $err ? ( -1, "__badExpression__: $err" ) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub types {
|
sub types {
|
||||||
|
|
|
@ -25,8 +25,8 @@ sub perlExpr {
|
||||||
$Lemonldap::NG::Common::Safelib::functions );
|
$Lemonldap::NG::Common::Safelib::functions );
|
||||||
$cpt->reval("BEGIN { 'warnings'->unimport; } $val");
|
$cpt->reval("BEGIN { 'warnings'->unimport; } $val");
|
||||||
my $err = join( '',
|
my $err = join( '',
|
||||||
grep { $_ =~ /Undefined subroutine/ ? () : $_ } split( /\n/, $@ ) );
|
grep { $_ =~ /(?:Undefined subroutine|Devel::StackTrace)/ ? () : $_ } split( /\n/, $@ ) );
|
||||||
return $err ? ( 0, "__badExpression__: $err" ) : (1);
|
return $err ? ( -1, "__badExpression__: $err" ) : (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $url = $RE{URI}{HTTP}{ -scheme => "https?" };
|
my $url = $RE{URI}{HTTP}{ -scheme => "https?" };
|
||||||
|
|
|
@ -1207,7 +1207,14 @@ sub _execTest {
|
||||||
if ( $ref eq 'CODE' ) {
|
if ( $ref eq 'CODE' ) {
|
||||||
my ( $r, $m ) = ( $test->( $value, $conf, $attr ) );
|
my ( $r, $m ) = ( $test->( $value, $conf, $attr ) );
|
||||||
if ($m) {
|
if ($m) {
|
||||||
push @{ $self->{ ( $r ? 'warnings' : 'errors' ) } },
|
push @{
|
||||||
|
$self->{ (
|
||||||
|
$r > 0
|
||||||
|
? 'warnings'
|
||||||
|
: ( $r < 0 ? 'needConfirmation' : 'errors' )
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
{ message => "$key: $m" };
|
{ message => "$key: $m" };
|
||||||
}
|
}
|
||||||
elsif ( !$r ) {
|
elsif ( !$r ) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user