Skip to content
Browse files

pddtypes.pod: add [#21979][#109744] referenced constant loses readonl…


Also add [#21979] to Cant declare subroutine entry in "my"
  • Loading branch information...
1 parent 66e9137 commit c25811c489fcc23ae081ef1e2d014f7528c72f4e @rurban committed Jul 20, 2012
Showing with 14 additions and 2 deletions.
  1. +14 −2 pddtypes.pod
16 pddtypes.pod
@@ -258,14 +258,14 @@ Modern C-like variant
=head2 Changes & existing bugs
-=head3 Can't declare subroutine entry in "my"
+=head3 [#21979] [#todo] Can't declare subroutine entry in "my"
Multiple B<my> declarations with types are not parsed correctly.
perl -e'$i::x; my (j $a, i $b)=(1,2);'
=> Can't declare subroutine entry in "my" at -e line 1, near ")="
- perl -e'$i::x; my (i $a)=(1);'
+ perl -e'my (i $a)=(1);'
=> Can't declare subroutine entry in "my" at -e line 1, near ")="
This is a parser problem.
@@ -280,7 +280,19 @@ and
perl -e'$i::x; my i $a;'
parses correctly.
+=head3 [#21979][#109744] referenced constant loses readonlyness
+On a threading Perl, a list-mode refgen applied to a constant will copy the constant
+rather than reference it, but the SVf_READONLY flag is not copied.
+An srefgen, however, will reference it. On a non-threading Perl constness
+is preserved.
+L<> starts with support for const
+pads (preserve and use const-ness at compile-time).
+See also L<Scalar::Construct> to create a const. This module was
+created in response to the ticket [#109744], similar but with less features
+than L<Readonly> or L<Const::Fast>.

0 comments on commit c25811c

Please sign in to comment.
Something went wrong with that request. Please try again.