From: <ol...@us...> - 2009-07-13 11:36:21
|
Revision: 11391 http://swig.svn.sourceforge.net/swig/?rev=11391&view=rev Author: olly Date: 2009-07-13 11:36:20 +0000 (Mon, 13 Jul 2009) Log Message: ----------- Document -const option. Modified Paths: -------------- trunk/Doc/Manual/Perl5.html Modified: trunk/Doc/Manual/Perl5.html =================================================================== --- trunk/Doc/Manual/Perl5.html 2009-07-12 21:11:08 UTC (rev 11390) +++ trunk/Doc/Manual/Perl5.html 2009-07-13 11:36:20 UTC (rev 11391) @@ -815,7 +815,7 @@ <p> -Constants are wrapped as read-only Perl variables. For example: +By default, constants are wrapped as read-only Perl variables. For example: </p> <div class="code"> @@ -838,6 +838,19 @@ </pre> </div> +<p> +Alternatively, if you use swig's <tt>-const</tt> option, constants are wrapped +such that the leading $ isn't required (by using a constant subroutine), which +usually gives a more natural Perl interface, for example: +</p> + +<div class="targetlang"> +<pre> +use example; +print example::FOO,"\n"; +</pre> +</div> + <H3><a name="Perl5_nn18"></a>28.4.4 Pointers</H3> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |