On Nov 2, 2010, at 9:43 AM, Nigel Kersten wrote:

> On Tue, Nov 2, 2010 at 4:32 PM, Patrick <kc7...@gmail.com> wrote:
>> 
>> On Nov 2, 2010, at 9:14 AM, Michael Gliwinski wrote:
>> 
>>> On Tuesday 02 Nov 2010 15:06:19 Nigel Kersten wrote:
>>>> On Tue, Nov 2, 2010 at 6:34 AM, jcbollinger <john.bollin...@stjude.org>
>>> wrote:
>>>>> On Nov 1, 7:07 pm, Nigel Kersten <ni...@puppetlabs.com> wrote:
>>>>>> It would be great if someone could update the original bug with the
>>>>>> position we've come to, otherwise I'll get to it in the next few days.
>>>>> 
>>>>> Done.
>>>>> 
>>>>> 
>>>>> John
>>>> 
>>>> Thanks. There's one thing I'm not quite clear on.
>>>> 
>>>> This proposal means we have concatenation and find-first-existing
>>>> support for the source parameter, and concatenation for the template
>>>> function, but how are we proposing we provide find-first-existing
>>>> support for the template and file functions? Or are we dropping that
>>>> goal?
>>> 
>>> I believe that was by either passing an array or multiple arguments, no?
>>> E.g.:
>>> 
>>> find-first-existing:
>>> 
>>>  file('foo', 'bar')
>>>  template('foo.erb', 'bar.erb')
>>> 
>>> concatenation:
>>> 
>>>  concat(file('foo'), file('bar'))
>>>  concat(template('foo.erb'), template('bar.erb'))
>>> 
>>> that way you can even mix them ;)
>>> 
>>>  concat(file('header'), template("foo.$host.erb", "foo.erb"))
>> 
>> The proposal I was supporting (and the one in the bug tracker) retained 
>> backward compatibility which means that passing more than one file to 
>> template() still concatenates.  That is deprecated though.
>> 
>> *) Would creating a function that says, 'return the first argument that 
>> doesn't throw an exception' be useful?
>> *) Is it even feasible to write?
> 
> maybe... I'm having trouble thinking of a decent name for this though :)
> 
>> *) Also, I'm assuming that file() and template() throw an exception if the 
>> file doesn't exist.  Does anyone know if that's true?
> 
> From memory they do, but I'll have to double check.
> 
>> *) Also, what would you name this function?
>> 
>> I'm thinking that if we do take this approach, it should be split off into 
>> another ticket.
> 
> I kind of disagree with splitting it off.
> 
> Perhaps I didn't express myself well, but my main impetus was to make
> the source/file/template data specifications *all* support the
> find-first-existing and concatenation functionality in a sane and
> consistent manner.

I know that was your intent, but I was thinking that from a coding and testing 
standpoint that these are two independent things.  Because of that, I though it 
should be split into different related tickets.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to