Issue #3229 has been updated by Graham Bleach.

I've just tripped up on this when using a selector. I'd like to vote for case 
sensitivity to be the default. Clearly changing to this is going to break 
things for all the people who are accidentally depending on case insensitivity, 
hopefully that's not many.

In the intervening time I'm adding both mixed and lowercase versions so that 
things don't break if this bug is fixed:

    $string = "Hello World"
    $test = $string ? {
        /Hello/ => "yes",
        /hello/ => "yes",
        default => "no",
    }
    notify{"$test":}

----------------------------------------
Bug #3229: Case regex are not case-insensitive
http://projects.reductivelabs.com/issues/3229

Author: Brice Figureau
Status: Needs design decision
Priority: Normal
Assigned to: Brice Figureau
Category: language
Target version: 
Affected version: 0.25.4
Keywords: regex case language selector
Branch: 


By default puppet case or selector statements are case insensitive.
This is done by downcasing both the side of the comparison.

Unfortunately, case regexes are still case sensitive, so the following manifest 
fails:
<pre>
$var = "CaseSensitive"
case $var {
  /CaseSensitive/: {
     notice("worked")
  }
  default: {
    fail "miserably"
  }
}
</pre>

The proposed change is to make sure case or selector regex are insensitive by 
default.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to