| 1 | =head1 NAME
|
|---|
| 2 |
|
|---|
| 3 | perl570delta - what's new for perl v5.7.0
|
|---|
| 4 |
|
|---|
| 5 | =head1 DESCRIPTION
|
|---|
| 6 |
|
|---|
| 7 | This document describes differences between the 5.6.0 release and
|
|---|
| 8 | the 5.7.0 release.
|
|---|
| 9 |
|
|---|
| 10 | =head1 Security Vulnerability Closed
|
|---|
| 11 |
|
|---|
| 12 | A potential security vulnerability in the optional suidperl component
|
|---|
| 13 | of Perl has been identified. suidperl is neither built nor installed
|
|---|
| 14 | by default. As of September the 2nd, 2000, the only known vulnerable
|
|---|
| 15 | platform is Linux, most likely all Linux distributions. CERT and
|
|---|
| 16 | various vendors have been alerted about the vulnerability.
|
|---|
| 17 |
|
|---|
| 18 | The problem was caused by Perl trying to report a suspected security
|
|---|
| 19 | exploit attempt using an external program, /bin/mail. On Linux
|
|---|
| 20 | platforms the /bin/mail program had an undocumented feature which
|
|---|
| 21 | when combined with suidperl gave access to a root shell, resulting in
|
|---|
| 22 | a serious compromise instead of reporting the exploit attempt. If you
|
|---|
| 23 | don't have /bin/mail, or if you have 'safe setuid scripts', or if
|
|---|
| 24 | suidperl is not installed, you are safe.
|
|---|
| 25 |
|
|---|
| 26 | The exploit attempt reporting feature has been completely removed from
|
|---|
| 27 | the Perl 5.7.0 release, so that particular vulnerability isn't there
|
|---|
| 28 | anymore. However, further security vulnerabilities are,
|
|---|
| 29 | unfortunately, always possible. The suidperl code is being reviewed
|
|---|
| 30 | and if deemed too risky to continue to be supported, it may be
|
|---|
| 31 | completely removed from future releases. In any case, suidperl should
|
|---|
| 32 | only be used by security experts who know exactly what they are doing
|
|---|
| 33 | and why they are using suidperl instead of some other solution such as
|
|---|
| 34 | sudo ( see http://www.courtesan.com/sudo/ ).
|
|---|
| 35 |
|
|---|
| 36 | =head1 Incompatible Changes
|
|---|
| 37 |
|
|---|
| 38 | =over 4
|
|---|
| 39 |
|
|---|
| 40 | =item *
|
|---|
| 41 |
|
|---|
| 42 | Arrays now always interpolate into double-quoted strings:
|
|---|
| 43 | constructs like "foo@bar" now always assume C<@bar> is an array,
|
|---|
| 44 | whether or not the compiler has seen use of C<@bar>.
|
|---|
| 45 |
|
|---|
| 46 | =item *
|
|---|
| 47 |
|
|---|
| 48 | The semantics of bless(REF, REF) were unclear and until someone proves
|
|---|
| 49 | it to make some sense, it is forbidden.
|
|---|
| 50 |
|
|---|
| 51 | =item *
|
|---|
| 52 |
|
|---|
| 53 | A reference to a reference now stringify as "REF(0x81485ec)" instead
|
|---|
| 54 | of "SCALAR(0x81485ec)" in order to be more consistent with the return
|
|---|
| 55 | value of ref().
|
|---|
| 56 |
|
|---|
| 57 | =item *
|
|---|
| 58 |
|
|---|
| 59 | The very dusty examples in the eg/ directory have been removed.
|
|---|
| 60 | Suggestions for new shiny examples welcome but the main issue is that
|
|---|
| 61 | the examples need to be documented, tested and (most importantly)
|
|---|
| 62 | maintained.
|
|---|
| 63 |
|
|---|
| 64 | =item *
|
|---|
| 65 |
|
|---|
| 66 | The obsolete chat2 library that should never have been allowed
|
|---|
| 67 | to escape the laboratory has been decommissioned.
|
|---|
| 68 |
|
|---|
| 69 | =item *
|
|---|
| 70 |
|
|---|
| 71 | The unimplemented POSIX regex features [[.cc.]] and [[=c=]] are still
|
|---|
| 72 | recognised but now cause fatal errors. The previous behaviour of
|
|---|
| 73 | ignoring them by default and warning if requested was unacceptable
|
|---|
| 74 | since it, in a way, falsely promised that the features could be used.
|
|---|
| 75 |
|
|---|
| 76 | =item *
|
|---|
| 77 |
|
|---|
| 78 | The (bogus) escape sequences \8 and \9 now give an optional warning
|
|---|
| 79 | ("Unrecognized escape passed through"). There is no need to \-escape
|
|---|
| 80 | any C<\w> character.
|
|---|
| 81 |
|
|---|
| 82 | =item *
|
|---|
| 83 |
|
|---|
| 84 | lstat(FILEHANDLE) now gives a warning because the operation makes no sense.
|
|---|
| 85 | In future releases this may become a fatal error.
|
|---|
| 86 |
|
|---|
| 87 | =item *
|
|---|
| 88 |
|
|---|
| 89 | The long deprecated uppercase aliases for the string comparison
|
|---|
| 90 | operators (EQ, NE, LT, LE, GE, GT) have now been removed.
|
|---|
| 91 |
|
|---|
| 92 | =item *
|
|---|
| 93 |
|
|---|
| 94 | The regular expression captured submatches ($1, $2, ...) are now
|
|---|
| 95 | more consistently unset if the match fails, instead of leaving false
|
|---|
| 96 | data lying around in them.
|
|---|
| 97 |
|
|---|
| 98 | =item *
|
|---|
| 99 |
|
|---|
| 100 | The tr///C and tr///U features have been removed and will not return;
|
|---|
| 101 | the interface was a mistake. Sorry about that. For similar
|
|---|
| 102 | functionality, see pack('U0', ...) and pack('C0', ...).
|
|---|
| 103 |
|
|---|
| 104 | =back
|
|---|
| 105 |
|
|---|
| 106 | =head1 Core Enhancements
|
|---|
| 107 |
|
|---|
| 108 | =over 4
|
|---|
| 109 |
|
|---|
| 110 | =item *
|
|---|
| 111 |
|
|---|
| 112 | C<perl -d:Module=arg,arg,arg> now works (previously one couldn't pass
|
|---|
| 113 | in multiple arguments.)
|
|---|
| 114 |
|
|---|
| 115 | =item *
|
|---|
| 116 |
|
|---|
| 117 | my __PACKAGE__ $obj now works.
|
|---|
| 118 |
|
|---|
| 119 | =item *
|
|---|
| 120 |
|
|---|
| 121 | C<no Module;> now works even if there is no "sub unimport" in the Module.
|
|---|
| 122 |
|
|---|
| 123 | =item *
|
|---|
| 124 |
|
|---|
| 125 | The numerical comparison operators return C<undef> if either operand
|
|---|
| 126 | is a NaN. Previously the behaviour was unspecified.
|
|---|
| 127 |
|
|---|
| 128 | =item *
|
|---|
| 129 |
|
|---|
| 130 | C<pack('U0a*', ...)> can now be used to force a string to UTF-8.
|
|---|
| 131 |
|
|---|
| 132 | =item *
|
|---|
| 133 |
|
|---|
| 134 | prototype(\&) is now available.
|
|---|
| 135 |
|
|---|
| 136 | =item *
|
|---|
| 137 |
|
|---|
| 138 | There is now an UNTIE method.
|
|---|
| 139 |
|
|---|
| 140 | =back
|
|---|
| 141 |
|
|---|
| 142 | =head1 Modules and Pragmata
|
|---|
| 143 |
|
|---|
| 144 | =head2 New Modules
|
|---|
| 145 |
|
|---|
| 146 | =over 4
|
|---|
| 147 |
|
|---|
| 148 | =item *
|
|---|
| 149 |
|
|---|
| 150 | File::Temp allows one to create temporary files and directories in an
|
|---|
| 151 | easy, portable, and secure way.
|
|---|
| 152 |
|
|---|
| 153 | =item *
|
|---|
| 154 |
|
|---|
| 155 | Storable gives persistence to Perl data structures by allowing the
|
|---|
| 156 | storage and retrieval of Perl data to and from files in a fast and
|
|---|
| 157 | compact binary format.
|
|---|
| 158 |
|
|---|
| 159 | =back
|
|---|
| 160 |
|
|---|
| 161 | =head2 Updated And Improved Modules and Pragmata
|
|---|
| 162 |
|
|---|
| 163 | =over 4
|
|---|
| 164 |
|
|---|
| 165 | =item *
|
|---|
| 166 |
|
|---|
| 167 | The following independently supported modules have been updated to
|
|---|
| 168 | newer versions from CPAN: CGI, CPAN, DB_File, File::Spec, Getopt::Long,
|
|---|
| 169 | the podlators bundle, Pod::LaTeX, Pod::Parser, Term::ANSIColor, Test.
|
|---|
| 170 |
|
|---|
| 171 | =item *
|
|---|
| 172 |
|
|---|
| 173 | Bug fixes and minor enhancements have been applied to B::Deparse,
|
|---|
| 174 | Data::Dumper, IO::Poll, IO::Socket::INET, Math::BigFloat,
|
|---|
| 175 | Math::Complex, Math::Trig, Net::protoent, the re pragma, SelfLoader,
|
|---|
| 176 | Sys::SysLog, Test::Harness, Text::Wrap, UNIVERSAL, and the warnings
|
|---|
| 177 | pragma.
|
|---|
| 178 |
|
|---|
| 179 | =item *
|
|---|
| 180 |
|
|---|
| 181 | The attributes::reftype() now works on tied arguments.
|
|---|
| 182 |
|
|---|
| 183 | =item *
|
|---|
| 184 |
|
|---|
| 185 | AutoLoader can now be disabled with C<no AutoLoader;>,
|
|---|
| 186 |
|
|---|
| 187 | =item *
|
|---|
| 188 |
|
|---|
| 189 | The English module can now be used without the infamous performance
|
|---|
| 190 | hit by saying
|
|---|
| 191 |
|
|---|
| 192 | use English '-no_performance_hit';
|
|---|
| 193 |
|
|---|
| 194 | (Assuming, of course, that one doesn't need the troublesome variables
|
|---|
| 195 | C<$`>, C<$&>, or C<$'>.) Also, introduced C<@LAST_MATCH_START> and
|
|---|
| 196 | C<@LAST_MATCH_END> English aliases for C<@-> and C<@+>.
|
|---|
| 197 |
|
|---|
| 198 | =item *
|
|---|
| 199 |
|
|---|
| 200 | File::Find now has pre- and post-processing callbacks. It also
|
|---|
| 201 | correctly changes directories when chasing symbolic links. Callbacks
|
|---|
| 202 | (naughtily) exiting with "next;" instead of "return;" now work.
|
|---|
| 203 |
|
|---|
| 204 | =item *
|
|---|
| 205 |
|
|---|
| 206 | File::Glob::glob() renamed to File::Glob::bsd_glob() to avoid
|
|---|
| 207 | prototype mismatch with CORE::glob().
|
|---|
| 208 |
|
|---|
| 209 | =item *
|
|---|
| 210 |
|
|---|
| 211 | IPC::Open3 now allows the use of numeric file descriptors.
|
|---|
| 212 |
|
|---|
| 213 | =item *
|
|---|
| 214 |
|
|---|
| 215 | use lib now works identically to @INC. Removing directories
|
|---|
| 216 | with 'no lib' now works.
|
|---|
| 217 |
|
|---|
| 218 | =item *
|
|---|
| 219 |
|
|---|
| 220 | C<%INC> now localised in a Safe compartment so that use/require work.
|
|---|
| 221 |
|
|---|
| 222 | =item *
|
|---|
| 223 |
|
|---|
| 224 | The Shell module now has an OO interface.
|
|---|
| 225 |
|
|---|
| 226 | =back
|
|---|
| 227 |
|
|---|
| 228 | =head1 Utility Changes
|
|---|
| 229 |
|
|---|
| 230 | =over 4
|
|---|
| 231 |
|
|---|
| 232 | =item *
|
|---|
| 233 |
|
|---|
| 234 | The Emacs perl mode (emacs/cperl-mode.el) has been updated to version
|
|---|
| 235 | 4.31.
|
|---|
| 236 |
|
|---|
| 237 | =item *
|
|---|
| 238 |
|
|---|
| 239 | Perlbug is now much more robust. It also sends the bug report to
|
|---|
| 240 | perl.org, not perl.com.
|
|---|
| 241 |
|
|---|
| 242 | =item *
|
|---|
| 243 |
|
|---|
| 244 | The perlcc utility has been rewritten and its user interface (that is,
|
|---|
| 245 | command line) is much more like that of the UNIX C compiler, cc.
|
|---|
| 246 |
|
|---|
| 247 | =item *
|
|---|
| 248 |
|
|---|
| 249 | The xsubpp utility for extension writers now understands POD
|
|---|
| 250 | documentation embedded in the *.xs files.
|
|---|
| 251 |
|
|---|
| 252 | =back
|
|---|
| 253 |
|
|---|
| 254 | =head1 New Documentation
|
|---|
| 255 |
|
|---|
| 256 | =over 4
|
|---|
| 257 |
|
|---|
| 258 | =item *
|
|---|
| 259 |
|
|---|
| 260 | perl56delta details the changes between the 5.005 release and the
|
|---|
| 261 | 5.6.0 release.
|
|---|
| 262 |
|
|---|
| 263 | =item *
|
|---|
| 264 |
|
|---|
| 265 | perldebtut is a Perl debugging tutorial.
|
|---|
| 266 |
|
|---|
| 267 | =item *
|
|---|
| 268 |
|
|---|
| 269 | perlebcdic contains considerations for running Perl on EBCDIC platforms.
|
|---|
| 270 | Note that unfortunately EBCDIC platforms that used to supported back in
|
|---|
| 271 | Perl 5.005 are still unsupported by Perl 5.7.0; the plan, however, is to
|
|---|
|
|---|