Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'typed/ro' of github.com:rurban/perl into typed/ro

  • Loading branch information...
commit 1fbee7377bf50bfdcdfbc1e3f8bbddb608015262 2 parents d1c07ab + c25811c
@rurban authored
Showing with 14 additions and 2 deletions.
  1. +14 −2 pddtypes.pod
View
16 pddtypes.pod
@@ -263,14 +263,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.
@@ -285,7 +285,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<http://github.com/rurban/perl/branch/typed/ro> 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>.
Please sign in to comment.
Something went wrong with that request. Please try again.