Skip to content

Commit

Permalink
perldelta - Wrapping, typos, GH links
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-m-hay committed Jul 20, 2023
1 parent a2cea0e commit ccfa6b5
Showing 1 changed file with 63 additions and 68 deletions.
131 changes: 63 additions & 68 deletions pod/perldelta.pod
Original file line number Diff line number Diff line change
Expand Up @@ -16,56 +16,54 @@ L<perl5390delta>, which describes differences between 5.38.0 and 5.39.0.

=head2 reset EXPR now calls set-magic on scalars

Previously C<reset EXPR> did not call set magic when clearing scalar
variables. This meant that changes did not propagate to the
underlying internal state where needed, such as for C<$^W>, and did
not result in an exception where the underlying magic would normally
throw an exception, such as for C<$1>.
Previously C<reset EXPR> did not call set magic when clearing scalar variables.
This meant that changes did not propagate to the underlying internal state
where needed, such as for C<$^W>, and did not result in an exception where the
underlying magic would normally throw an exception, such as for C<$1>.

This means code that had no effect before may now actually have an
effect, including possibly throwing an exception.
This means code that had no effect before may now actually have an effect,
including possibly throwing an exception.

C<reset EXPR> already called set magic when modifying arrays and
hashes.
C<reset EXPR> already called set magic when modifying arrays and hashes.

This has no effect on plain C<reset> used to reset one-match searches
as with C<m?pattern?>.
This has no effect on plain C<reset> used to reset one-match searches as with
C<m?pattern?>.

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

=head2 Calling the import method of an unknown package produces an error

Historically it has been possible to call the import() or unimport()
method of any class, including ones which have not been defined, with
an argument and not experience an error. For instance this code will
not throw an error in 5.38:
Historically, it has been possible to call the import() or unimport() method of
any class, including ones which have not been defined, with an argument and not
experience an error. For instance, this code will not throw an error in Perl
5.38:

Class::That::Does::Not::Exist->import("foo");

however, as of 5.39.1 this will throw an exception. Note that calling
these methods with no arguments continues to silently succeed and do
nothing. For instance
However, as of Perl 5.39.1 this will throw an exception. Note that calling
these methods with no arguments continues to silently succeed and do nothing.
For instance,

Class::That::Does::Not::Exist->import();

will continue to not throw an error. This is because every class
implicitly inherits from the class UNIVERSAL which now defines an import
method. In older perls there was no such method defined, and instead the
method calls for C<import> and C<unimport> were special cased to not
throw errors if there was no such method defined.
will continue to not throw an error. This is because every class implicitly
inherits from the class UNIVERSAL which now defines an import method. In older
perls there was no such method defined, and instead the method calls for
C<import> and C<unimport> were special cased to not throw errors if there was
no such method defined.

This change has been added because it makes it easier to detect case
typos in C<use> statements when running on case-insensitive file
systems. For instance, on Windows or other platforms with
case-insensitive file systems on older perls the following code
This change has been added because it makes it easier to detect case typos in
C<use> statements when running on case-insensitive file systems. For instance,
on Windows or other platforms with case-insensitive file systems on older perls
the following code

use STRICT 'refs';

would silently do nothing as the module is actually called 'strict.pm'
not 'STRICT.pm', so it would be loaded, but its import method would
never be called. It will also detect cases where a user passes an
argument when using a package that does not provide its own import, for
instance most "pure" class definitions do not define an import method.
would silently do nothing as the module is actually called 'strict.pm', not
'STRICT.pm', so it would be loaded but its import method would never be called.
It will also detect cases where a user passes an argument when using a package
that does not provide its own import, for instance most "pure" class
definitions do not define an import method.

=head1 Modules and Pragmata

Expand All @@ -89,9 +87,9 @@ L<CPAN::Meta::Requirements> has been upgraded from version 2.140 to 2.143.

L<Errno> has been upgraded from version 1.37 to 1.38.

The C<osvers> and C<archname> baked into the module to ensure Errno is
loaded by the perl that built it are now more comprehensively
escaped. [GH #21135]
The C<osvers> and C<archname> baked into the module to ensure Errno is loaded
by the perl that built it are now more comprehensively escaped.
[L<GH #21135|https://github.com/Perl/perl5/issues/21135>]

=item *

Expand Down Expand Up @@ -175,9 +173,9 @@ L<warnings> has been upgraded from version 1.65 to 1.66.

=head2 Changes to Existing Documentation

We have attempted to update the documentation to reflect the changes
listed in this document. If you find any we have missed, open an issue
at L<https://github.com/Perl/perl5/issues>.
We have attempted to update the documentation to reflect the changes listed in
this document. If you find any we have missed, open an issue at
L<https://github.com/Perl/perl5/issues>.

Additionally, the following selected changes have been made:

Expand All @@ -187,8 +185,8 @@ Additionally, the following selected changes have been made:

=item *

Document we can't use compound literals or array designators due to
C++ compatibility. [GH #21073]
Document we can't use compound literals or array designators due to C++
compatibility. [L<GH #21073|https://github.com/Perl/perl5/issues/21073>]

=back

Expand All @@ -206,36 +204,34 @@ diagnostic messages, see L<perldiag>.

=item *

L<Attempt to call undefined %s method with arguments via package
"%s" (perhaps you forgot to load the package?)|
perldiag/"Attempt to call undefined %s method with arguments via package
"%s" (perhaps you forgot to load the package?)">
L<Attempt to call undefined %s method with arguments via package "%s" (perhaps
you forgot to load the package?)|perldiag/"Attempt to call undefined %s method
with arguments via package "%s" (perhaps you forgot to load the package?)">

(F) You called the C<import()> or C<unimport()> method of a class that
has no import method defined in its inheritance graph, and passed an
argument to the method. This is very often the sign of a mispelled
package name in a use or require statement that has silently succeded
due to a case insensitive file system.
(F) You called the C<import()> or C<unimport()> method of a class that has no
import method defined in its inheritance graph, and passed an argument to the
method. This is very often the sign of a misspelled package name in a use or
require statement that has silently succeeded due to a case-insensitive file
system.

Another common reason this may happen is when mistakenly attempting to
import or unimport a symbol from a class definition or package which
does not use C<Exporter> or otherwise define its own C<import> or
C<unimport> method.
Another common reason this may happen is when mistakenly attempting to import
or unimport a symbol from a class definition or package which does not use
C<Exporter> or otherwise define its own C<import> or C<unimport> method.

=back

=head1 Testing

Tests were added and changed to reflect the other additions and
changes in this release. Furthermore, these significant changes were
made:
Tests were added and changed to reflect the other additions and changes in this
release. Furthermore, these significant changes were made:

=over 4

=item *

Update F<nm> output parsing for Darwin in F<t/porting/libperl.t> to
handle changes in the output of nm on Darwin. [GH #21117]
Update F<nm> output parsing for Darwin in F<t/porting/libperl.t> to handle
changes in the output of nm on Darwin.
[L<GH #21117|https://github.com/Perl/perl5/issues/21117>]

=back

Expand All @@ -247,8 +243,8 @@ handle changes in the output of nm on Darwin. [GH #21117]

=item Windows

Eliminated several header build warnings under MSVC with C</W4> to
reduce noise for embedders. [GH #21031]
Eliminated several header build warnings under MSVC with C</W4> to reduce noise
for embedders. [L<GH #21031|https://github.com/Perl/perl5/issues/21031>]

=back

Expand All @@ -260,23 +256,22 @@ XXX Generate this with:

=head1 Reporting Bugs

If you find what you think is a bug, you might check the perl bug database
at L<https://github.com/Perl/perl5/issues>. There may also be information at
If you find what you think is a bug, you might check the perl bug database at
L<https://github.com/Perl/perl5/issues>. There may also be information at
L<http://www.perl.org/>, the Perl Home Page.

If you believe you have an unreported bug, please open an issue at
L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
tiny but sufficient test case.

If the bug you are reporting has security implications which make it
inappropriate to send to a public issue tracker, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
for details of how to report the issue.
inappropriate to send to a public issue tracker, then see L<perlsec/SECURITY
VULNERABILITY CONTACT INFORMATION> for details of how to report the issue.

=head1 Give Thanks

If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
you can do so by running the C<perlthanks> program:
If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, you
can do so by running the C<perlthanks> program:

perlthanks

Expand Down

0 comments on commit ccfa6b5

Please sign in to comment.