Skip to content

Commit

Permalink
perldelta for 91e15e5, reinstate apostrophe package separator
Browse files Browse the repository at this point in the history
It's in incompatible changes, it doesn't really belong in Core
Enhancements.
  • Loading branch information
tonycoz committed Nov 11, 2024
1 parent 91e15e5 commit 3888e10
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions pod/perldelta.pod
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,35 @@ XXX For a release on a stable branch, this section aspires to be:

[ List each incompatible change as a =head2 entry ]

=head2 Apostrophe is again recognized as a global name separator

This was deprecated in Perl 5.38 and removed as scheduled in perl
5.41.3, after some discussion has been reinstated by default.

This can be controlled with the C<apostrophe_as_package_separator>
feature which is enabled by default, but is disabled from the 5.41
feature bundle onwards.

If you want to disable use within your own code you can explicitly
disable the feature:

no feature "apostrophe_as_package_separator";

Note that disabling this feature only prevents use of apostrophe as a
package separator within code, unlike with the reverted removal
symbolic references still treat C<'> as C<::> with the feature
disabled:

my $symref = "My'Module'Var";
# default features
my $x = $My'Module'Var; # fine
no feature "apostrophe_as_package_separator";
no strict "refs";
my $y = $$symref; # like $My::Module::Var
my $z = $My'Module'Var; # syntax error

[L<GH #22644|https://github.com/Perl/perl5/issues/22644>]

=head1 Deprecations

XXX Any deprecated features, syntax, modules etc. should be listed here.
Expand Down

0 comments on commit 3888e10

Please sign in to comment.