I began using the 'given/when' keywords a couple of weeks back - which are a nice edition in my opinion and make perl that bit more C'ish. However, after finally getting around to downloading the newest "StarberryPerl" this morning I have started to see 'given is experimental' and 'when is experimental' warnings. On consulting the fascinating "PerlDelta" page it seems it is more a question of 'smartmatch' being up for change/deprecation than 'given' itself. However the warnings are still there and the documentation is vague... I think I could specifically switch that warning off, but I do not want to get used to what for me would be a fairly staple code construct and then have it vanish when 5.20 appears.
Do any of you chaps know for sure if 'given' is doomed/safe? Do you use it heavily in your own programmes?
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|