perl5120delta — что нового в perl v.5.12.0 | Participants
|
- Statistics
- Participants
- Translate into Russian
- Translation result
- 2% translated in draft.
If you do not want to register an account, you can sign in with OpenID.
perl5120delta - what is new for perl v5.12.0 | ||
=encoding utf8 | ||
=head1 NAME | ||
perl5120delta - what is new for perl v5.12.0 | ||
=head1 DESCRIPTION | ||
This document describes differences between the 5.10.0 release and the | В этом документе описываются различия между версиями perl 5.10.0 и perl 5.12.0 | |
Many of the bug fixes in 5.12.0 are already included in the 5.10.1 | Многие из ошибок, исправленные в 5.12.0 уже включены в perl 5.10.1. | |
You can see the list of those changes in the 5.10.1 release notes | Посмотреть список этих изменений можно в документе L<perl5101delta>. | |
=head1 Core Enhancements | ||
=head2 New C<package NAME VERSION> syntax | ||
This new syntax allows a module author to set the $VERSION of a namespace | Новый синтасис позволяет автору модуля при объявлении пакета указывать его версию Это устраняет необходимость в C<our $VERSION = ...> и других аналогичных конструкциях. | |
package Foo::Bar 1.23; | ||
There are several advantages to this: | ||
=over | ||
=item * | ||
C<$VERSION> is parsed in exactly the same way as C<use NAME VERSION> | C<$VERSION> анализируется точно так же, как C<use NAME VERSION> | |
=item * | ||
C<$VERSION> is set at compile time | ||
=item * | ||
C<$VERSION> is a version object that provides proper overloading of | C<$VERSION> представляет собой версию объекта, который обеспечивает | |
=item * | ||
Eliminates C<$VERSION = ...> and C<eval $VERSION> clutter | Исключает беспорядок C<$VERSION = ...> и C<eval $VERSION> | |
=item * | ||
As it requires VERSION to be a numeric literal or v-string | Как она требует VERSION, которая будет числовым литералом или v-образным строковым литералом, он может статически интерпретироваться средствами компиляции модулей без C<eval> путем MM-E<gt>parse_version для C<$VERSION = ...> | |
=back | ||
It does not break old code with only C<package NAME>, but code that uses | ||
However, C<package NAME VERSION> requires a new, 'strict' version | ||
=head2 The C<...> operator | ||
A new operator, C<...>, nicknamed the Yada Yada operator, has been added. | ||
=head2 Implicit strictures | ||
Using the C<use VERSION> syntax with a version number greater or equal |
