Issue #8776 has been updated by James Turnbull.

Status changed from Unreviewed to Needs Decision
Assignee set to Nigel Kersten


----------------------------------------
Feature #8776: Previously declared parameter in define are usable only if they 
come befor in alphabetical order
https://projects.puppetlabs.com/issues/8776

Author: Bruno Leon
Status: Needs Decision
Priority: Normal
Assignee: Nigel Kersten
Category: 
Target version: 
Affected Puppet version: 2.7.2rc3
Keywords: define parameters defaults sort
Branch: 


I would be usefull if defaults parmater could be set based on the previous ones.
At the moment,this does work only if the referred parameter comes before in 
alphabetical order.

Working example:

    define test (
    $a = false,
    $b = $a? {
    true => 1,
    false =>  2,
    }
    ) {
    notify { $b: }
    }
    test { 'mytest': }

    notice: 2
    notice: /Stage[main]//Test[mytest]/Notify[2]/message: defined 'message' as 
'2'
    notice: Finished catalog run in 0.32 seconds

Non working one:

    define test (
    $c = false,
    $b = $c? {
    true => 1,
    false =>  2,
    }
    ) {
    notify { $b: }
    }
    test { 'mytest': }
    No matching value for selector param 'undef' at /root/test.pp:6
    zsh: exit 1     puppet apply test.pp




-- 
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://projects.puppetlabs.com/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