Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Allow a dash in the middle of a varname (and to end one)
* Allow changable varname regex for profile checks via

	Limit  profile_check_varname_regex   \b\w[-+.\w]*
  • Loading branch information
perusionmike committed May 27, 2016
1 parent 974896c commit a3fe0ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Vend/Order.pm
Expand Up @@ -857,11 +857,14 @@ sub do_check {

my $conditional_update;
my $parameter = $_;

my $varex = $::Limit->{profile_check_varname_regex} || '\w[-\w]*';

my($var, $val, $m, $message);
if (/^&/) {
($var,$val) = split /[\s=]+/, $parameter, 2;
}
elsif ($parameter =~ /(\w+)[\s=]+(.*)/) {
elsif ($parameter =~ /($varex)[\s=]+(.*)/) {
my $k = $1;
my $v = $2;
$conditional_update = $Update;
Expand Down

0 comments on commit a3fe0ea

Please sign in to comment.