diff --git a/Doc/Manual/Perl5.html b/Doc/Manual/Perl5.html index f77dc2f01..b5ad99769 100644 --- a/Doc/Manual/Perl5.html +++ b/Doc/Manual/Perl5.html @@ -815,7 +815,7 @@ extern char *path; // Declared later in the input

-Constants are wrapped as read-only Perl variables. For example: +By default, constants are wrapped as read-only Perl variables. For example:

@@ -838,6 +838,19 @@ $example::FOO = 2; # Error
+

+Alternatively, if you use swig's -const 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: +

+ +
+
+use example;
+print example::FOO,"\n";
+
+
+

28.4.4 Pointers