=head1 NAME
-perldelta - what's new for perl v5.6.0
+perl56delta - what's new for perl v5.6.0
=head1 DESCRIPTION
# new features supported
}
-C<require> and C<use> also have some special magic to support such literals.
-They will be interpreted as a version rather than as a module name:
+C<require> and C<use> also have some special magic to support such
+literals, but this particular usage should be avoided because it leads to
+misleading error messages under versions of Perl which don't support vector
+strings. Using a true version number will ensure correct behavior in all
+versions of Perl:
- require v5.6.0; # croak if $^V lt v5.6.0
- use v5.6.0; # same, but croaks at compile-time
-
-Alternatively, the C<v> may be omitted if there is more than one dot:
-
- require 5.6.0;
- use 5.6.0;
+ require 5.006; # run time check for v5.6
+ use 5.006_001; # compile time check for v5.6.1
Also, C<sprintf> and C<printf> support the Perl-specific format flag C<%v>
to print ordinals of characters in arbitrary strings:
that with a C<use attrs> pragma in the body of the subroutine.
That can now be accomplished with declaration syntax, like this:
- sub mymethod : locked method ;
+ sub mymethod : locked method;
...
sub mymethod : locked method {
...
}
- sub othermethod :locked :method ;
+ sub othermethod :locked :method;
...
sub othermethod :locked :method {
...
is destroyed and all the weak references to the object are
automatically undef-ed.
-To use this feature, you need the WeakRef package from CPAN, which
+To use this feature, you need the Devel::WeakRef package from CPAN, which
contains additional documentation.
NOTE: This is an experimental feature. Details are subject to change.
already. The fatal error has been downgraded to an optional warning:
Possible unintended interpolation of @example in string
-
+
This warns you that C<"fred@example.com"> is going to turn into
C<fred.com> if you don't backslash the C<@>.
-
-See L<http://www.plover.com/~mjd/perl/at-error.html> for more details
+See http://www.plover.com/~mjd/perl/at-error.html for more details
about the history here.
+=head2 @- and @+ provide starting/ending offsets of regex matches
+
+The new magic variables @- and @+ provide the starting and ending
+offsets, respectively, of $&, $1, $2, etc. See L<perlvar> for
+details.
+
=head1 Modules and Pragmata
=head2 Modules
=item B
The Perl Compiler suite has been extensively reworked for this
-release. More of the standard Perl testsuite passes when run
+release. More of the standard Perl test suite passes when run
under the Compiler, but there is still a significant way to
go to achieve production quality compiled executables.
=head1 NAME
- sample - Using GetOpt::Long and Pod::Usage
+ sample - Using Getopt::Long and Pod::Usage
=head1 SYNOPSIS
behavior, END blocks are not executed anymore when the C<-c> switch
is used, or if compilation fails.
-See L<CHECK blocks> for how to run things when the compile phase ends.
+See L</"Support for CHECK blocks"> for how to run things when the compile
+phase ends.
=head2 Potential to leak DATA filehandles
In Perl 5.6.0 and later, C<"$$1"> always means C<"${$1}">.
-=item delete(), values() and C<\(%h)> operate on aliases to values, not copies
+=item delete(), each(), values() and C<\(%h)>
+
+operate on aliases to values, not copies
-delete(), each(), values() and hashes in a list context return the actual
+delete(), each(), values() and hashes (e.g. C<\(%h)>)
+in a list context return the actual
values in the hash, instead of copies (as they used to in earlier
versions). Typical idioms for using these constructs copy the
returned values, but this can make a significant difference when
=head2 Compatible C Source API Changes
-=over
+=over 4
=item C<PATCHLEVEL> is now C<PERL_VERSION>
=item The DB module
-=item The regular expression constructs C<(?{ code })> and C<(??{ code })>
+=item The regular expression code constructs:
+
+C<(?{ code })> and C<(??{ code })>
=back
If you find what you think is a bug, you might check the
articles recently posted to the comp.lang.perl.misc newsgroup.
-There may also be information at http://www.perl.com/perl/, the Perl
+There may also be information at http://www.perl.com/perl/ , the Perl
Home Page.
If you believe you have an unreported bug, please run the B<perlbug>
program included with your release. Be sure to trim your bug down
to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug@perl.com to be
+output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team.
=head1 SEE ALSO
Written by Gurusamy Sarathy <F<gsar@activestate.com>>, with many
contributions from The Perl Porters.
-Send omissions or corrections to <F<perlbug@perl.com>>.
+Send omissions or corrections to <F<perlbug@perl.org>>.
=cut