Приглашаем посетить
Булгарин (bulgarin.lit-info.ru)

7.12 Perl 5.8.1

Previous Table of Contents Next

7.12 Perl 5.8.1

Use of pseudo-hashes triggered a warning that they were deprecated (and will be gone entirely in Perl 5.10.0). The $* variable (an ancient way of turning on multiline regular expression matching) was also deprecated.

7.12.1 Upgrading to Perl 5.8.1

If you're using pseudo-hashes, use something else, or wrap their use with this:


no warnings 'deprecated';

Pseudo-hashes had little use aside from being used internally by the fields pragma, which will continue to work as advertised, by using something other than pseudo-hashes behind the scenes. Their main use was to restrict the keys of a hash so that new ones couldn't accidentally be created. You can avail yourself of this functionality with the lock_keys() function in the core module Hash::Util (and that is just what the fields pragma now does).

Use the /m modifier on regular expressions instead of setting $*.

    Previous Table of Contents Next