<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/1476/">https://reviewboard.asterisk.org/r/1476/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On November 3rd, 2011, 2:49 a.m., <b>wdoekes</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">As for the name -- I would've preferred #require vs. #include, but it's a bit late for that now ;)
The other options:
#sinclude +1
#tryinclude +.5
#includeif +0</pre>
</blockquote>
<p>On November 3rd, 2011, 2:57 a.m., <b>wdoekes</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The reason:
I rate the "similar usage in a different domain" (sinclude in m4) higher than self-documentation in this case. (PHP's require/include has them both.)
Why? Many people use several languages daily, and having to remember that sinclude is called yinclude in language z is a larger PITA than having to look up the not-self-documenting name, that sinclude unfortunately is, the first time.</pre>
</blockquote>
<p>On November 7th, 2011, 8:35 a.m., <b>Tilghman Lesher</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">If we're going down this road, it might be better to make a generic #if/#endif preprocessor entry that allows something like FILEEXISTS() as an argument. I can see where this would be expanded in the future, and it's better to get the initial syntax correct than to deal with multiple iterations that may need to be grandfathered.</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I would be against adding more complexity than is absolutely needed. If someone really needs to do something like #if (it is tuesday) #include tuesday_dialplan.conf, then they need to learn to write a dynamic dialplan, IMHO. There are much better ways to deal with that kind of thing. This is nice and simple--just don't fail on a #include w/o a file. I don't think we should be in the writing-languages-with-preprocessors business.</pre>
<br />
<p>- Terry</p>
<br />
<p>On September 30th, 2011, 2:56 p.m., Paul Belanger wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers and leifmadsen.</div>
<div>By Paul Belanger.</div>
<p style="color: grey;"><i>Updated Sept. 30, 2011, 2:56 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Talking with Leif on IRC today, he was asking for a way to include a config file, that might not exist all the time. Because #include 'foo.conf' to a non existing will fail to load a module, we decided #includeif might be better.
#exec cat foo.conf is another option, however this seems to require more CPU and opens a potential security issue.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Local development box testing. A few more testers would be nice :D</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>trunk/CHANGES <span style="color: grey">(338717)</span></li>
<li>trunk/main/config.c <span style="color: grey">(338717)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/1476/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>