Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

993 lines
34 KiB

  1. =head1 NAME
  2. perldelta - what's new for perl5.005
  3. =head1 DESCRIPTION
  4. This document describes differences between the 5.004 release and this one.
  5. =head1 About the new versioning system
  6. Perl is now developed on two tracks: a maintenance track that makes
  7. small, safe updates to released production versions with emphasis on
  8. compatibility; and a development track that pursues more aggressive
  9. evolution. Maintenance releases (which should be considered production
  10. quality) have subversion numbers that run from C<1> to C<49>, and
  11. development releases (which should be considered "alpha" quality) run
  12. from C<50> to C<99>.
  13. Perl 5.005 is the combined product of the new dual-track development
  14. scheme.
  15. =head1 Incompatible Changes
  16. =head2 WARNING: This version is not binary compatible with Perl 5.004.
  17. Starting with Perl 5.004_50 there were many deep and far-reaching changes
  18. to the language internals. If you have dynamically loaded extensions
  19. that you built under perl 5.003 or 5.004, you can continue to use them
  20. with 5.004, but you will need to rebuild and reinstall those extensions
  21. to use them 5.005. See F<INSTALL> for detailed instructions on how to
  22. upgrade.
  23. =head2 Default installation structure has changed
  24. The new Configure defaults are designed to allow a smooth upgrade from
  25. 5.004 to 5.005, but you should read F<INSTALL> for a detailed
  26. discussion of the changes in order to adapt them to your system.
  27. =head2 Perl Source Compatibility
  28. When none of the experimental features are enabled, there should be
  29. very few user-visible Perl source compatibility issues.
  30. If threads are enabled, then some caveats apply. C<@_> and C<$_> become
  31. lexical variables. The effect of this should be largely transparent to
  32. the user, but there are some boundary conditions under which user will
  33. need to be aware of the issues. For example, C<local(@_)> results in
  34. a "Can't localize lexical variable @_ ..." message. This may be enabled
  35. in a future version.
  36. Some new keywords have been introduced. These are generally expected to
  37. have very little impact on compatibility. See L<New C<INIT> keyword>,
  38. L<New C<lock> keyword>, and L<New C<qr//> operator>.
  39. Certain barewords are now reserved. Use of these will provoke a warning
  40. if you have asked for them with the C<-w> switch.
  41. See L<C<our> is now a reserved word>.
  42. =head2 C Source Compatibility
  43. There have been a large number of changes in the internals to support
  44. the new features in this release.
  45. =over 4
  46. =item *
  47. Core sources now require ANSI C compiler
  48. An ANSI C compiler is now B<required> to build perl. See F<INSTALL>.
  49. =item *
  50. All Perl global variables must now be referenced with an explicit prefix
  51. All Perl global variables that are visible for use by extensions now
  52. have a C<PL_> prefix. New extensions should C<not> refer to perl globals
  53. by their unqualified names. To preserve sanity, we provide limited
  54. backward compatibility for globals that are being widely used like
  55. C<sv_undef> and C<na> (which should now be written as C<PL_sv_undef>,
  56. C<PL_na> etc.)
  57. If you find that your XS extension does not compile anymore because a
  58. perl global is not visible, try adding a C<PL_> prefix to the global
  59. and rebuild.
  60. It is strongly recommended that all functions in the Perl API that don't
  61. begin with C<perl> be referenced with a C<Perl_> prefix. The bare function
  62. names without the C<Perl_> prefix are supported with macros, but this
  63. support may cease in a future release.
  64. See L<perlguts/"API LISTING">.
  65. =item *
  66. Enabling threads has source compatibility issues
  67. Perl built with threading enabled requires extensions to use the new
  68. C<dTHR> macro to initialize the handle to access per-thread data.
  69. If you see a compiler error that talks about the variable C<thr> not
  70. being declared (when building a module that has XS code), you need
  71. to add C<dTHR;> at the beginning of the block that elicited the error.
  72. The API function C<perl_get_sv("@",FALSE)> should be used instead of
  73. directly accessing perl globals as C<GvSV(errgv)>. The API call is
  74. backward compatible with existing perls and provides source compatibility
  75. with threading is enabled.
  76. See L<"C Source Compatibility"> for more information.
  77. =back
  78. =head2 Binary Compatibility
  79. This version is NOT binary compatible with older versions. All extensions
  80. will need to be recompiled. Further binaries built with threads enabled
  81. are incompatible with binaries built without. This should largely be
  82. transparent to the user, as all binary incompatible configurations have
  83. their own unique architecture name, and extension binaries get installed at
  84. unique locations. This allows coexistence of several configurations in
  85. the same directory hierarchy. See F<INSTALL>.
  86. =head2 Security fixes may affect compatibility
  87. A few taint leaks and taint omissions have been corrected. This may lead
  88. to "failure" of scripts that used to work with older versions. Compiling
  89. with -DINCOMPLETE_TAINTS provides a perl with minimal amounts of changes
  90. to the tainting behavior. But note that the resulting perl will have
  91. known insecurities.
  92. Oneliners with the C<-e> switch do not create temporary files anymore.
  93. =head2 Relaxed new mandatory warnings introduced in 5.004
  94. Many new warnings that were introduced in 5.004 have been made
  95. optional. Some of these warnings are still present, but perl's new
  96. features make them less often a problem. See L<New Diagnostics>.
  97. =head2 Licensing
  98. Perl has a new Social Contract for contributors. See F<Porting/Contract>.
  99. The license included in much of the Perl documentation has changed.
  100. Most of the Perl documentation was previously under the implicit GNU
  101. General Public License or the Artistic License (at the user's choice).
  102. Now much of the documentation unambiguously states the terms under which
  103. it may be distributed. Those terms are in general much less restrictive
  104. than the GNU GPL. See L<perl> and the individual perl man pages listed
  105. therein.
  106. =head1 Core Changes
  107. =head2 Threads
  108. WARNING: Threading is considered an B<experimental> feature. Details of the
  109. implementation may change without notice. There are known limitations
  110. and some bugs. These are expected to be fixed in future versions.
  111. See F<README.threads>.
  112. =head2 Compiler
  113. WARNING: The Compiler and related tools are considered B<experimental>.
  114. Features may change without notice, and there are known limitations
  115. and bugs. Since the compiler is fully external to perl, the default
  116. configuration will build and install it.
  117. The Compiler produces three different types of transformations of a
  118. perl program. The C backend generates C code that captures perl's state
  119. just before execution begins. It eliminates the compile-time overheads
  120. of the regular perl interpreter, but the run-time performance remains
  121. comparatively the same. The CC backend generates optimized C code
  122. equivalent to the code path at run-time. The CC backend has greater
  123. potential for big optimizations, but only a few optimizations are
  124. implemented currently. The Bytecode backend generates a platform
  125. independent bytecode representation of the interpreter's state
  126. just before execution. Thus, the Bytecode back end also eliminates
  127. much of the compilation overhead of the interpreter.
  128. The compiler comes with several valuable utilities.
  129. C<B::Lint> is an experimental module to detect and warn about suspicious
  130. code, especially the cases that the C<-w> switch does not detect.
  131. C<B::Deparse> can be used to demystify perl code, and understand
  132. how perl optimizes certain constructs.
  133. C<B::Xref> generates cross reference reports of all definition and use
  134. of variables, subroutines and formats in a program.
  135. C<B::Showlex> show the lexical variables used by a subroutine or file
  136. at a glance.
  137. C<perlcc> is a simple frontend for compiling perl.
  138. See C<ext/B/README>, L<B>, and the respective compiler modules.
  139. =head2 Regular Expressions
  140. Perl's regular expression engine has been seriously overhauled, and
  141. many new constructs are supported. Several bugs have been fixed.
  142. Here is an itemized summary:
  143. =over 4
  144. =item Many new and improved optimizations
  145. Changes in the RE engine:
  146. Unneeded nodes removed;
  147. Substrings merged together;
  148. New types of nodes to process (SUBEXPR)* and similar expressions
  149. quickly, used if the SUBEXPR has no side effects and matches
  150. strings of the same length;
  151. Better optimizations by lookup for constant substrings;
  152. Better search for constants substrings anchored by $ ;
  153. Changes in Perl code using RE engine:
  154. More optimizations to s/longer/short/;
  155. study() was not working;
  156. /blah/ may be optimized to an analogue of index() if $& $` $' not seen;
  157. Unneeded copying of matched-against string removed;
  158. Only matched part of the string is copying if $` $' were not seen;
  159. =item Many bug fixes
  160. Note that only the major bug fixes are listed here. See F<Changes> for others.
  161. Backtracking might not restore start of $3.
  162. No feedback if max count for * or + on "complex" subexpression
  163. was reached, similarly (but at compile time) for {3,34567}
  164. Primitive restrictions on max count introduced to decrease a
  165. possibility of a segfault;
  166. (ZERO-LENGTH)* could segfault;
  167. (ZERO-LENGTH)* was prohibited;
  168. Long REs were not allowed;
  169. /RE/g could skip matches at the same position after a
  170. zero-length match;
  171. =item New regular expression constructs
  172. The following new syntax elements are supported:
  173. (?<=RE)
  174. (?<!RE)
  175. (?{ CODE })
  176. (?i-x)
  177. (?i:RE)
  178. (?(COND)YES_RE|NO_RE)
  179. (?>RE)
  180. \z
  181. =item New operator for precompiled regular expressions
  182. See L<New C<qr//> operator>.
  183. =item Other improvements
  184. Better debugging output (possibly with colors),
  185. even from non-debugging Perl;
  186. RE engine code now looks like C, not like assembler;
  187. Behaviour of RE modifiable by `use re' directive;
  188. Improved documentation;
  189. Test suite significantly extended;
  190. Syntax [:^upper:] etc., reserved inside character classes;
  191. =item Incompatible changes
  192. (?i) localized inside enclosing group;
  193. $( is not interpolated into RE any more;
  194. /RE/g may match at the same position (with non-zero length)
  195. after a zero-length match (bug fix).
  196. =back
  197. See L<perlre> and L<perlop>.
  198. =head2 Improved malloc()
  199. See banner at the beginning of C<malloc.c> for details.
  200. =head2 Quicksort is internally implemented
  201. Perl now contains its own highly optimized qsort() routine. The new qsort()
  202. is resistant to inconsistent comparison functions, so Perl's C<sort()> will
  203. not provoke coredumps any more when given poorly written sort subroutines.
  204. (Some C library C<qsort()>s that were being used before used to have this
  205. problem.) In our testing, the new C<qsort()> required the minimal number
  206. of pair-wise compares on average, among all known C<qsort()> implementations.
  207. See C<perlfunc/sort>.
  208. =head2 Reliable signals
  209. Perl's signal handling is susceptible to random crashes, because signals
  210. arrive asynchronously, and the Perl runtime is not reentrant at arbitrary
  211. times.
  212. However, one experimental implementation of reliable signals is available
  213. when threads are enabled. See C<Thread::Signal>. Also see F<INSTALL> for
  214. how to build a Perl capable of threads.
  215. =head2 Reliable stack pointers
  216. The internals now reallocate the perl stack only at predictable times.
  217. In particular, magic calls never trigger reallocations of the stack,
  218. because all reentrancy of the runtime is handled using a "stack of stacks".
  219. This should improve reliability of cached stack pointers in the internals
  220. and in XSUBs.
  221. =head2 More generous treatment of carriage returns
  222. Perl used to complain if it encountered literal carriage returns in
  223. scripts. Now they are mostly treated like whitespace within program text.
  224. Inside string literals and here documents, literal carriage returns are
  225. ignored if they occur paired with linefeeds, or get interpreted as whitespace
  226. if they stand alone. This behavior means that literal carriage returns
  227. in files should be avoided. You can get the older, more compatible (but
  228. less generous) behavior by defining the preprocessor symbol
  229. C<PERL_STRICT_CR> when building perl. Of course, all this has nothing
  230. whatever to do with how escapes like C<\r> are handled within strings.
  231. Note that this doesn't somehow magically allow you to keep all text files
  232. in DOS format. The generous treatment only applies to files that perl
  233. itself parses. If your C compiler doesn't allow carriage returns in
  234. files, you may still be unable to build modules that need a C compiler.
  235. =head2 Memory leaks
  236. C<substr>, C<pos> and C<vec> don't leak memory anymore when used in lvalue
  237. context. Many small leaks that impacted applications that embed multiple
  238. interpreters have been fixed.
  239. =head2 Better support for multiple interpreters
  240. The build-time option C<-DMULTIPLICITY> has had many of the details
  241. reworked. Some previously global variables that should have been
  242. per-interpreter now are. With care, this allows interpreters to call
  243. each other. See the C<PerlInterp> extension on CPAN.
  244. =head2 Behavior of local() on array and hash elements is now well-defined
  245. See L<perlsub/"Temporary Values via local()">.
  246. =head2 C<%!> is transparently tied to the L<Errno> module
  247. See L<perlvar>, and L<Errno>.
  248. =head2 Pseudo-hashes are supported
  249. See L<perlref>.
  250. =head2 C<EXPR foreach EXPR> is supported
  251. See L<perlsyn>.
  252. =head2 Keywords can be globally overridden
  253. See L<perlsub>.
  254. =head2 C<$^E> is meaningful on Win32
  255. See L<perlvar>.
  256. =head2 C<foreach (1..1000000)> optimized
  257. C<foreach (1..1000000)> is now optimized into a counting loop. It does
  258. not try to allocate a 1000000-size list anymore.
  259. =head2 C<Foo::> can be used as implicitly quoted package name
  260. Barewords caused unintuitive behavior when a subroutine with the same
  261. name as a package happened to be defined. Thus, C<new Foo @args>,
  262. use the result of the call to C<Foo()> instead of C<Foo> being treated
  263. as a literal. The recommended way to write barewords in the indirect
  264. object slot is C<new Foo:: @args>. Note that the method C<new()> is
  265. called with a first argument of C<Foo>, not C<Foo::> when you do that.
  266. =head2 C<exists $Foo::{Bar::}> tests existence of a package
  267. It was impossible to test for the existence of a package without
  268. actually creating it before. Now C<exists $Foo::{Bar::}> can be
  269. used to test if the C<Foo::Bar> namespace has been created.
  270. =head2 Better locale support
  271. See L<perllocale>.
  272. =head2 Experimental support for 64-bit platforms
  273. Perl5 has always had 64-bit support on systems with 64-bit longs.
  274. Starting with 5.005, the beginnings of experimental support for systems
  275. with 32-bit long and 64-bit 'long long' integers has been added.
  276. If you add -DUSE_LONG_LONG to your ccflags in config.sh (or manually
  277. define it in perl.h) then perl will be built with 'long long' support.
  278. There will be many compiler warnings, and the resultant perl may not
  279. work on all systems. There are many other issues related to
  280. third-party extensions and libraries. This option exists to allow
  281. people to work on those issues.
  282. =head2 prototype() returns useful results on builtins
  283. See L<perlfunc/prototype>.
  284. =head2 Extended support for exception handling
  285. C<die()> now accepts a reference value, and C<$@> gets set to that
  286. value in exception traps. This makes it possible to propagate
  287. exception objects. This is an undocumented B<experimental> feature.
  288. =head2 Re-blessing in DESTROY() supported for chaining DESTROY() methods
  289. See L<perlobj/Destructors>.
  290. =head2 All C<printf> format conversions are handled internally
  291. See L<perlfunc/printf>.
  292. =head2 New C<INIT> keyword
  293. C<INIT> subs are like C<BEGIN> and C<END>, but they get run just before
  294. the perl runtime begins execution. e.g., the Perl Compiler makes use of
  295. C<INIT> blocks to initialize and resolve pointers to XSUBs.
  296. =head2 New C<lock> keyword
  297. The C<lock> keyword is the fundamental synchronization primitive
  298. in threaded perl. When threads are not enabled, it is currently a noop.
  299. To minimize impact on source compatibility this keyword is "weak", i.e., any
  300. user-defined subroutine of the same name overrides it, unless a C<use Thread>
  301. has been seen.
  302. =head2 New C<qr//> operator
  303. The C<qr//> operator, which is syntactically similar to the other quote-like
  304. operators, is used to create precompiled regular expressions. This compiled
  305. form can now be explicitly passed around in variables, and interpolated in
  306. other regular expressions. See L<perlop>.
  307. =head2 C<our> is now a reserved word
  308. Calling a subroutine with the name C<our> will now provoke a warning when
  309. using the C<-w> switch.
  310. =head2 Tied arrays are now fully supported
  311. See L<Tie::Array>.
  312. =head2 Tied handles support is better
  313. Several missing hooks have been added. There is also a new base class for
  314. TIEARRAY implementations. See L<Tie::Array>.
  315. =head2 4th argument to substr
  316. substr() can now both return and replace in one operation. The optional
  317. 4th argument is the replacement string. See L<perlfunc/substr>.
  318. =head2 Negative LENGTH argument to splice
  319. splice() with a negative LENGTH argument now work similar to what the
  320. LENGTH did for substr(). Previously a negative LENGTH was treated as
  321. 0. See L<perlfunc/splice>.
  322. =head2 Magic lvalues are now more magical
  323. When you say something like C<substr($x, 5) = "hi">, the scalar returned
  324. by substr() is special, in that any modifications to it affect $x.
  325. (This is called a 'magic lvalue' because an 'lvalue' is something on
  326. the left side of an assignment.) Normally, this is exactly what you
  327. would expect to happen, but Perl uses the same magic if you use substr(),
  328. pos(), or vec() in a context where they might be modified, like taking
  329. a reference with C<\> or as an argument to a sub that modifies C<@_>.
  330. In previous versions, this 'magic' only went one way, but now changes
  331. to the scalar the magic refers to ($x in the above example) affect the
  332. magic lvalue too. For instance, this code now acts differently:
  333. $x = "hello";
  334. sub printit {
  335. $x = "g'bye";
  336. print $_[0], "\n";
  337. }
  338. printit(substr($x, 0, 5));
  339. In previous versions, this would print "hello", but it now prints "g'bye".
  340. =head2 <> now reads in records
  341. If C<$/> is a reference to an integer, or a scalar that holds an integer,
  342. <> will read in records instead of lines. For more info, see
  343. L<perlvar/$/>.
  344. =head1 Supported Platforms
  345. Configure has many incremental improvements. Site-wide policy for building
  346. perl can now be made persistent, via Policy.sh. Configure also records
  347. the command-line arguments used in F<config.sh>.
  348. =head2 New Platforms
  349. BeOS is now supported. See F<README.beos>.
  350. DOS is now supported under the DJGPP tools. See F<README.dos> (installed
  351. as L<perldos> on some systems).
  352. MiNT is now supported. See F<README.mint>.
  353. MPE/iX is now supported. See F<README.mpeix>.
  354. MVS (aka OS390, aka Open Edition) is now supported. See F<README.os390>
  355. (installed as L<perlos390> on some systems).
  356. Stratus VOS is now supported. See F<README.vos>.
  357. =head2 Changes in existing support
  358. Win32 support has been vastly enhanced. Support for Perl Object, a C++
  359. encapsulation of Perl. GCC and EGCS are now supported on Win32.
  360. See F<README.win32>, aka L<perlwin32>.
  361. VMS configuration system has been rewritten. See F<README.vms> (installed
  362. as L<README_vms> on some systems).
  363. The hints files for most Unix platforms have seen incremental improvements.
  364. =head1 Modules and Pragmata
  365. =head2 New Modules
  366. =over 4
  367. =item B
  368. Perl compiler and tools. See L<B>.
  369. =item Data::Dumper
  370. A module to pretty print Perl data. See L<Data::Dumper>.
  371. =item Dumpvalue
  372. A module to dump perl values to the screen. See L<Dumpvalue>.
  373. =item Errno
  374. A module to look up errors more conveniently. See L<Errno>.
  375. =item File::Spec
  376. A portable API for file operations.
  377. =item ExtUtils::Installed
  378. Query and manage installed modules.
  379. =item ExtUtils::Packlist
  380. Manipulate .packlist files.
  381. =item Fatal
  382. Make functions/builtins succeed or die.
  383. =item IPC::SysV
  384. Constants and other support infrastructure for System V IPC operations
  385. in perl.
  386. =item Test
  387. A framework for writing testsuites.
  388. =item Tie::Array
  389. Base class for tied arrays.
  390. =item Tie::Handle
  391. Base class for tied handles.
  392. =item Thread
  393. Perl thread creation, manipulation, and support.
  394. =item attrs
  395. Set subroutine attributes.
  396. =item fields
  397. Compile-time class fields.
  398. =item re
  399. Various pragmata to control behavior of regular expressions.
  400. =back
  401. =head2 Changes in existing modules
  402. =over 4
  403. =item Benchmark
  404. You can now run tests for I<x> seconds instead of guessing the right
  405. number of tests to run.
  406. Keeps better time.
  407. =item Carp
  408. Carp has a new function cluck(). cluck() warns, like carp(), but also adds
  409. a stack backtrace to the error message, like confess().
  410. =item CGI
  411. CGI has been updated to version 2.42.
  412. =item Fcntl
  413. More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for
  414. large (more than 4G) file access (the 64-bit support is not yet
  415. working, though, so no need to get overly excited), Free/Net/OpenBSD
  416. locking behaviour flags F_FLOCK, F_POSIX, Linux F_SHLCK, and
  417. O_ACCMODE: the mask of O_RDONLY, O_WRONLY, and O_RDWR.
  418. =item Math::Complex
  419. The accessors methods Re, Im, arg, abs, rho, theta, methods can
  420. ($z->Re()) now also act as mutators ($z->Re(3)).
  421. =item Math::Trig
  422. A little bit of radial trigonometry (cylindrical and spherical) added,
  423. for example the great circle distance.
  424. =item POSIX
  425. POSIX now has its own platform-specific hints files.
  426. =item DB_File
  427. DB_File supports version 2.x of Berkeley DB. See C<ext/DB_File/Changes>.
  428. =item MakeMaker
  429. MakeMaker now supports writing empty makefiles, provides a way to
  430. specify that site umask() policy should be honored. There is also
  431. better support for manipulation of .packlist files, and getting
  432. information about installed modules.
  433. Extensions that have both architecture-dependent and
  434. architecture-independent files are now always installed completely in
  435. the architecture-dependent locations. Previously, the shareable parts
  436. were shared both across architectures and across perl versions and were
  437. therefore liable to be overwritten with newer versions that might have
  438. subtle incompatibilities.
  439. =item CPAN
  440. See <perlmodinstall> and L<CPAN>.
  441. =item Cwd
  442. Cwd::cwd is faster on most platforms.
  443. =back
  444. =head1 Utility Changes
  445. C<h2ph> and related utilities have been vastly overhauled.
  446. C<perlcc>, a new experimental front end for the compiler is available.
  447. The crude GNU C<configure> emulator is now called C<configure.gnu> to
  448. avoid trampling on C<Configure> under case-insensitive filesystems.
  449. C<perldoc> used to be rather slow. The slower features are now optional.
  450. In particular, case-insensitive searches need the C<-i> switch, and
  451. recursive searches need C<-r>. You can set these switches in the
  452. C<PERLDOC> environment variable to get the old behavior.
  453. =head1 Documentation Changes
  454. Config.pm now has a glossary of variables.
  455. F<Porting/patching.pod> has detailed instructions on how to create and
  456. submit patches for perl.
  457. L<perlport> specifies guidelines on how to write portably.
  458. L<perlmodinstall> describes how to fetch and install modules from C<CPAN>
  459. sites.
  460. Some more Perl traps are documented now. See L<perltrap>.
  461. L<perlopentut> gives a tutorial on using open().
  462. L<perlreftut> gives a tutorial on references.
  463. L<perlthrtut> gives a tutorial on threads.
  464. =head1 New Diagnostics
  465. =over 4
  466. =item Ambiguous call resolved as CORE::%s(), qualify as such or use &
  467. (W) A subroutine you have declared has the same name as a Perl keyword,
  468. and you have used the name without qualification for calling one or the
  469. other. Perl decided to call the builtin because the subroutine is
  470. not imported.
  471. To force interpretation as a subroutine call, either put an ampersand
  472. before the subroutine name, or qualify the name with its package.
  473. Alternatively, you can import the subroutine (or pretend that it's
  474. imported with the C<use subs> pragma).
  475. To silently interpret it as the Perl operator, use the C<CORE::> prefix
  476. on the operator (e.g. C<CORE::log($x)>) or by declaring the subroutine
  477. to be an object method (see L<attrs>).
  478. =item Bad index while coercing array into hash
  479. (F) The index looked up in the hash found as the 0'th element of a
  480. pseudo-hash is not legal. Index values must be at 1 or greater.
  481. See L<perlref>.
  482. =item Bareword "%s" refers to nonexistent package
  483. (W) You used a qualified bareword of the form C<Foo::>, but
  484. the compiler saw no other uses of that namespace before that point.
  485. Perhaps you need to predeclare a package?
  486. =item Can't call method "%s" on an undefined value
  487. (F) You used the syntax of a method call, but the slot filled by the
  488. object reference or package name contains an undefined value.
  489. Something like this will reproduce the error:
  490. $BADREF = 42;
  491. process $BADREF 1,2,3;
  492. $BADREF->process(1,2,3);
  493. =item Can't check filesystem of script "%s" for nosuid
  494. (P) For some reason you can't check the filesystem of the script for nosuid.
  495. =item Can't coerce array into hash
  496. (F) You used an array where a hash was expected, but the array has no
  497. information on how to map from keys to array indices. You can do that
  498. only with arrays that have a hash reference at index 0.
  499. =item Can't goto subroutine from an eval-string
  500. (F) The "goto subroutine" call can't be used to jump out of an eval "string".
  501. (You can use it to jump out of an eval {BLOCK}, but you probably don't want to.)
  502. =item Can't localize pseudo-hash element
  503. (F) You said something like C<< local $ar->{'key'} >>, where $ar is
  504. a reference to a pseudo-hash. That hasn't been implemented yet, but
  505. you can get a similar effect by localizing the corresponding array
  506. element directly -- C<< local $ar->[$ar->[0]{'key'}] >>.
  507. =item Can't use %%! because Errno.pm is not available
  508. (F) The first time the %! hash is used, perl automatically loads the
  509. Errno.pm module. The Errno module is expected to tie the %! hash to
  510. provide symbolic names for C<$!> errno values.
  511. =item Cannot find an opnumber for "%s"
  512. (F) A string of a form C<CORE::word> was given to prototype(), but
  513. there is no builtin with the name C<word>.
  514. =item Character class syntax [. .] is reserved for future extensions
  515. (W) Within regular expression character classes ([]) the syntax beginning
  516. with "[." and ending with ".]" is reserved for future extensions.
  517. If you need to represent those character sequences inside a regular
  518. expression character class, just quote the square brackets with the
  519. backslash: "\[." and ".\]".
  520. =item Character class syntax [: :] is reserved for future extensions
  521. (W) Within regular expression character classes ([]) the syntax beginning
  522. with "[:" and ending with ":]" is reserved for future extensions.
  523. If you need to represent those character sequences inside a regular
  524. expression character class, just quote the square brackets with the
  525. backslash: "\[:" and ":\]".
  526. =item Character class syntax [= =] is reserved for future extensions
  527. (W) Within regular expression character classes ([]) the syntax
  528. beginning with "[=" and ending with "=]" is reserved for future extensions.
  529. If you need to represent those character sequences inside a regular
  530. expression character class, just quote the square brackets with the
  531. backslash: "\[=" and "=\]".
  532. =item %s: Eval-group in insecure regular expression
  533. (F) Perl detected tainted data when trying to compile a regular expression
  534. that contains the C<(?{ ... })> zero-width assertion, which is unsafe.
  535. See L<perlre/(?{ code })>, and L<perlsec>.
  536. =item %s: Eval-group not allowed, use re 'eval'
  537. (F) A regular expression contained the C<(?{ ... })> zero-width assertion,
  538. but that construct is only allowed when the C<use re 'eval'> pragma is
  539. in effect. See L<perlre/(?{ code })>.
  540. =item %s: Eval-group not allowed at run time
  541. (F) Perl tried to compile a regular expression containing the C<(?{ ... })>
  542. zero-width assertion at run time, as it would when the pattern contains
  543. interpolated values. Since that is a security risk, it is not allowed.
  544. If you insist, you may still do this by explicitly building the pattern
  545. from an interpolated string at run time and using that in an eval().
  546. See L<perlre/(?{ code })>.
  547. =item Explicit blessing to '' (assuming package main)
  548. (W) You are blessing a reference to a zero length string. This has
  549. the effect of blessing the reference into the package main. This is
  550. usually not what you want. Consider providing a default target
  551. package, e.g. bless($ref, $p || 'MyPackage');
  552. =item Illegal hex digit ignored
  553. (W) You may have tried to use a character other than 0 - 9 or A - F in a
  554. hexadecimal number. Interpretation of the hexadecimal number stopped
  555. before the illegal character.
  556. =item No such array field
  557. (F) You tried to access an array as a hash, but the field name used is
  558. not defined. The hash at index 0 should map all valid field names to
  559. array indices for that to work.
  560. =item No such field "%s" in variable %s of type %s
  561. (F) You tried to access a field of a typed variable where the type
  562. does not know about the field name. The field names are looked up in
  563. the %FIELDS hash in the type package at compile time. The %FIELDS hash
  564. is usually set up with the 'fields' pragma.
  565. =item Out of memory during ridiculously large request
  566. (F) You can't allocate more than 2^31+"small amount" bytes. This error
  567. is most likely to be caused by a typo in the Perl program. e.g., C<$arr[time]>
  568. instead of C<$arr[$time]>.
  569. =item Range iterator outside integer range
  570. (F) One (or both) of the numeric arguments to the range operator ".."
  571. are outside the range which can be represented by integers internally.
  572. One possible workaround is to force Perl to use magical string
  573. increment by prepending "0" to your numbers.
  574. =item Recursive inheritance detected while looking for method '%s' %s
  575. (F) More than 100 levels of inheritance were encountered while invoking a
  576. method. Probably indicates an unintended loop in your inheritance hierarchy.
  577. =item Reference found where even-sized list expected
  578. (W) You gave a single reference where Perl was expecting a list with
  579. an even number of elements (for assignment to a hash). This
  580. usually means that you used the anon hash constructor when you meant
  581. to use parens. In any case, a hash requires key/value B<pairs>.
  582. %hash = { one => 1, two => 2, }; # WRONG
  583. %hash = [ qw/ an anon array / ]; # WRONG
  584. %hash = ( one => 1, two => 2, ); # right
  585. %hash = qw( one 1 two 2 ); # also fine
  586. =item Undefined value assigned to typeglob
  587. (W) An undefined value was assigned to a typeglob, a la C<*foo = undef>.
  588. This does nothing. It's possible that you really mean C<undef *foo>.
  589. =item Use of reserved word "%s" is deprecated
  590. (D) The indicated bareword is a reserved word. Future versions of perl
  591. may use it as a keyword, so you're better off either explicitly quoting
  592. the word in a manner appropriate for its context of use, or using a
  593. different name altogether. The warning can be suppressed for subroutine
  594. names by either adding a C<&> prefix, or using a package qualifier,
  595. e.g. C<&our()>, or C<Foo::our()>.
  596. =item perl: warning: Setting locale failed.
  597. (S) The whole warning message will look something like:
  598. perl: warning: Setting locale failed.
  599. perl: warning: Please check that your locale settings:
  600. LC_ALL = "En_US",
  601. LANG = (unset)
  602. are supported and installed on your system.
  603. perl: warning: Falling back to the standard locale ("C").
  604. Exactly what were the failed locale settings varies. In the above the
  605. settings were that the LC_ALL was "En_US" and the LANG had no value.
  606. This error means that Perl detected that you and/or your system
  607. administrator have set up the so-called variable system but Perl could
  608. not use those settings. This was not dead serious, fortunately: there
  609. is a "default locale" called "C" that Perl can and will use, the
  610. script will be run. Before you really fix the problem, however, you
  611. will get the same error message each time you run Perl. How to really
  612. fix the problem can be found in L<perllocale/"LOCALE PROBLEMS">.
  613. =back
  614. =head1 Obsolete Diagnostics
  615. =over 4
  616. =item Can't mktemp()
  617. (F) The mktemp() routine failed for some reason while trying to process
  618. a B<-e> switch. Maybe your /tmp partition is full, or clobbered.
  619. Removed because B<-e> doesn't use temporary files any more.
  620. =item Can't write to temp file for B<-e>: %s
  621. (F) The write routine failed for some reason while trying to process
  622. a B<-e> switch. Maybe your /tmp partition is full, or clobbered.
  623. Removed because B<-e> doesn't use temporary files any more.
  624. =item Cannot open temporary file
  625. (F) The create routine failed for some reason while trying to process
  626. a B<-e> switch. Maybe your /tmp partition is full, or clobbered.
  627. Removed because B<-e> doesn't use temporary files any more.
  628. =item regexp too big
  629. (F) The current implementation of regular expressions uses shorts as
  630. address offsets within a string. Unfortunately this means that if
  631. the regular expression compiles to longer than 32767, it'll blow up.
  632. Usually when you want a regular expression this big, there is a better
  633. way to do it with multiple statements. See L<perlre>.
  634. =back
  635. =head1 Configuration Changes
  636. You can use "Configure -Uinstallusrbinperl" which causes installperl
  637. to skip installing perl also as /usr/bin/perl. This is useful if you
  638. prefer not to modify /usr/bin for some reason or another but harmful
  639. because many scripts assume to find Perl in /usr/bin/perl.
  640. =head1 BUGS
  641. If you find what you think is a bug, you might check the headers of
  642. recently posted articles in the comp.lang.perl.misc newsgroup.
  643. There may also be information at http://www.perl.com/perl/, the Perl
  644. Home Page.
  645. If you believe you have an unreported bug, please run the B<perlbug>
  646. program included with your release. Make sure you trim your bug down
  647. to a tiny but sufficient test case. Your bug report, along with the
  648. output of C<perl -V>, will be sent off to <F<[email protected]>> to be
  649. analysed by the Perl porting team.
  650. =head1 SEE ALSO
  651. The F<Changes> file for exhaustive details on what changed.
  652. The F<INSTALL> file for how to build Perl.
  653. The F<README> file for general stuff.
  654. The F<Artistic> and F<Copying> files for copyright information.
  655. =head1 HISTORY
  656. Written by Gurusamy Sarathy <F<[email protected]>>, with many contributions
  657. from The Perl Porters.
  658. Send omissions or corrections to <F<[email protected]>>.
  659. =cut