1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>perldelta - perldoc.perl.org</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="en-gb">
<link rel="search" type="application/opensearchdescription+xml" title="Search perldoc.perl.org" href="/static/search.xml"/>
<link href="static/css-20100830.css" rel="stylesheet" rev="stylesheet" type="text/css" media="screen">
<link href="static/exploreperl.css" rel="stylesheet" rev="stylesheet" type="text/css">
</head>
<body onLoad="perldoc.startup();" onPageShow="if (event.persisted) perldoc.startup();">
<div id="page">
<div id="header">
<div id="homepage_link">
<a href="index.html"></a>
</div>
<div id="strapline">
Perl Programming Documentation
</div>
<div id="download_link" class="download">
<a href="http://www.perl.org/get.html">Download Perl</a>
</div>
<div id="explore_link" class="download">
<a id="explore_anchor" href="#">Explore</a>
</div>
</div>
<div id="body">
<div id="left_column">
<div class="side_group">
<div class="side_panel doc_panel">
<p>Manual</p>
<ul>
<li><a href="index-overview.html">Overview</a>
<li><a href="index-tutorials.html">Tutorials</a>
<li><a href="index-faq.html">FAQs</a>
<li><a href="index-history.html">History / Changes</a>
<li><a href="index-licence.html">License</a>
</ul>
</div>
<div class="side_panel doc_panel">
<p>Reference</p>
<ul>
<li><a href="index-language.html">Language</a>
<li><a href="index-functions.html">Functions</a>
<li><a href="perlop.html">Operators</a>
<li><a href="perlvar.html">Special Variables</a>
<li><a href="index-pragmas.html">Pragmas</a>
<li><a href="index-utilities.html">Utilities</a>
<li><a href="index-internals.html">Internals</a>
<li><a href="index-platforms.html">Platform Specific</a>
</ul>
</div>
<div class="side_panel doc_panel">
<p>Modules</p>
<ul>
<li>
<a href="index-modules-A.html">A</a>
•
<a href="index-modules-B.html">B</a>
•
<a href="index-modules-C.html">C</a>
•
<a href="index-modules-D.html">D</a>
•
<a href="index-modules-E.html">E</a>
<li>
<a href="index-modules-F.html">F</a>
•
<a href="index-modules-G.html">G</a>
•
<a href="index-modules-H.html">H</a>
•
<a href="index-modules-I.html">I</a>
•
<a href="index-modules-L.html">L</a>
<li>
<a href="index-modules-M.html">M</a>
•
<a href="index-modules-N.html">N</a>
•
<a href="index-modules-O.html">O</a>
•
<a href="index-modules-P.html">P</a>
•
<a href="index-modules-S.html">S</a>
<li>
<a href="index-modules-T.html">T</a>
•
<a href="index-modules-U.html">U</a>
•
<a href="index-modules-X.html">X</a>
</ul>
</div>
<div class="side_panel doc_panel">
<p>Tools</p>
<ul>
<li><a href="preferences.html">Preferences</a>
</ul>
</div>
</div>
</div>
<div id="centre_column">
<div id="content_header">
<div id="title_bar">
<div id="page_name">
<h1>perldelta</h1>
</div>
<div id="perl_version">
Perl 5 version 22.0 documentation
</div>
<div class="page_links" id="page_links_top">
<a href="#" onClick="toolbar.goToTop();return false;">Go to top</a>
</div>
<div class="page_links" id="page_links_bottom">
<a href="#" id="page_index_toggle">Show page index</a> •
<a href="#" id="recent_pages_toggle">Show recent pages</a>
</div>
<div id="search_form">
<form action="search.html" method="GET" id="search">
<input type="text" name="q" id="search_box" alt="Search">
</form>
</div>
</div>
<div id="breadcrumbs">
<a href="index.html">Home</a> >
<a href="index-history.html">History / Changes</a> >
perldelta
</div>
</div>
<div id="content_body">
<!--[if lt IE 7]>
<div class="noscript">
<p>
<strong>It looks like you're using Internet Explorer 6. This is a very old
browser which does not offer full support for modern websites.</strong>
</p>
<p>
Unfortunately this means that this website will not work on
your computer.
</p>
<p>
Don't miss out though! To view the site (and get a better experience from
many other websites), simply upgrade to
<a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx">Internet
Explorer 8</a>
or download an alternative browser such as
<a href="http://www.mozilla.com/en-US/firefox/firefox.html">Firefox</a>,
<a href="http://www.apple.com/safari/download/">Safari</a>, or
<a href="http://www.google.co.uk/chrome">Google Chrome</a>.
</p>
<p>
All of these browsers are free. If you're using a PC at work, you may
need to contact your IT administrator.
</p>
</div>
<![endif]-->
<noscript>
<div class="noscript">
<p>
<strong>Please note: Many features of this site require JavaScript. You appear to have JavaScript disabled,
or are running a non-JavaScript capable web browser.</strong>
</p>
<p>
To get the best experience, please enable JavaScript or download a modern web browser such as <a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx">Internet Explorer 8</a>, <a href="http://www.mozilla.com/en-US/firefox/firefox.html">Firefox</a>, <a href="http://www.apple.com/safari/download/">Safari</a>, or <a href="http://www.google.co.uk/chrome">Google Chrome</a>.
</p>
</div>
</noscript>
<div id="recent_pages" class="hud_container">
<div id="recent_pages_header" class="hud_header">
<div id="recent_pages_close" class="hud_close"><a href="#" onClick="recentPages.hide();return false;"></a></div>
<div id="recent_pages_title" class="hud_title"><span class="hud_span_top">Recently read</span></div>
<div id="recent_pages_topright" class="hud_topright"></div>
</div>
<div id="recent_pages_content" class="hud_content">
</div>
<div id="recent_pages_footer" class="hud_footer">
<div id="recent_pages_bottomleft" class="hud_bottomleft"></div>
<div id="recent_pages_bottom" class="hud_bottom"><span class="hud_span_bottom"></span></div>
<div id="recent_pages_resize" class="hud_resize"></div>
</div>
</div>
<div id="from_search"></div>
<h1>perldelta</h1>
<!-- -->
<ul><li><a href="#NAME">NAME</a><li><a href="#DESCRIPTION">DESCRIPTION</a><li><a href="#Core-Enhancements">Core Enhancements</a><ul><li><a href="#New-bitwise-operators">New bitwise operators</a><li><a href="#New-double-diamond-operator">New double-diamond operator</a><li><a href="#New-%5cb-boundaries-in-regular-expressions">New \b boundaries in regular expressions</a><li><a href="#Non-Capturing-Regular-Expression-Flag">Non-Capturing Regular Expression Flag</a><li><a href="#use-re-'strict'">use re 'strict'</a><li><a href="#Unicode-7.0-(with-correction)-is-now-supported">Unicode 7.0 (with correction) is now supported</a><li><a href="#use-locale-can-restrict-which-locale-categories-are-affected">use locale can restrict which locale categories are affected</a><li><a href="#Perl-now-supports-POSIX-2008-locale-currency-additions">Perl now supports POSIX 2008 locale currency additions</a><li><a href="#Better-heuristics-on-older-platforms-for-determining-locale-UTF-8ness">Better heuristics on older platforms for determining locale UTF-8ness</a><li><a href="#Aliasing-via-reference">Aliasing via reference</a><li><a href="#prototype-with-no-arguments">prototype with no arguments</a><li><a href="#New-%3aconst-subroutine-attribute">New :const subroutine attribute</a><li><a href="#fileno-now-works-on-directory-handles">fileno now works on directory handles</a><li><a href="#List-form-of-pipe-open-implemented-for-Win32">List form of pipe open implemented for Win32</a><li><a href="#Assignment-to-list-repetition">Assignment to list repetition</a><li><a href="#Infinity-and-NaN-(not-a-number)-handling-improved">Infinity and NaN (not-a-number) handling improved</a><li><a href="#Floating-point-parsing-has-been-improved">Floating point parsing has been improved</a><li><a href="#Packing-infinity-or-not-a-number-into-a-character-is-now-fatal">Packing infinity or not-a-number into a character is now fatal</a><li><a href="#Experimental-C-Backtrace-API">Experimental C Backtrace API</a></ul><li><a href="#Security">Security</a><ul><li><a href="#Perl-is-now-compiled-with--fstack-protector-strong-if-available">Perl is now compiled with -fstack-protector-strong if available</a><li><a href="#The-the-Safe-manpage-module-could-allow-outside-packages-to-be-replaced">The the Safe manpage module could allow outside packages to be replaced</a><li><a href="#Perl-is-now-always-compiled-with--D_FORTIFY_SOURCE%3d2-if-available">Perl is now always compiled with -D_FORTIFY_SOURCE=2 if available</a></ul><li><a href="#Incompatible-Changes">Incompatible Changes</a><ul><li><a href="#Subroutine-signatures-moved-before-attributes">Subroutine signatures moved before attributes</a><li><a href="#%26-and-%5c%26-prototypes-accepts-only-subs">& and \& prototypes accepts only subs</a><li><a href="#use-encoding-is-now-lexical">use encoding is now lexical</a><li><a href="#List-slices-returning-empty-lists">List slices returning empty lists</a><li><a href="#%5cN%7b%7d-with-a-sequence-of-multiple-spaces-is-now-a-fatal-error">\N{} with a sequence of multiple spaces is now a fatal error</a><li><a href="#use-UNIVERSAL-'...'-is-now-a-fatal-error">use UNIVERSAL '...' is now a fatal error</a><li><a href="#In-double-quotish-%5cc_X_%2c-_X_-must-now-be-a-printable-ASCII-character">In double-quotish \c_X_, _X_ must now be a printable ASCII character</a><li><a href="#Splitting-the-tokens-(%3f-and-(*-in-regular-expressions-is-now-a-fatal-compilation-error.">Splitting the tokens (? and (* in regular expressions is now a fatal compilation error.</a><li><a href="#qr%2ffoo%2fx-now-ignores-all-Unicode-pattern-white-space">qr/foo/x now ignores all Unicode pattern white space</a><li><a href="#Comment-lines-within-(%3f%5b-%5d)-are-now-ended-only-by-a-%5cn">Comment lines within (?[ ]) are now ended only by a \n</a><li><a href="#(%3f%5b...%5d)-operators-now-follow-standard-Perl-precedence">(?[...]) operators now follow standard Perl precedence</a><li><a href="#Omitting-%25-and-%40-on-hash-and-array-names-is-no-longer-permitted">Omitting % and @ on hash and array names is no longer permitted</a><li><a href="#%22%24!%22-text-is-now-in-English-outside-the-scope-of-use-locale">"$!" text is now in English outside the scope of use locale</a><li><a href="#%22%24!%22-text-will-be-returned-in-UTF-8-when-appropriate">"$!" text will be returned in UTF-8 when appropriate</a><li><a href="#Support-for-%3fPATTERN%3f-without-explicit-operator-has-been-removed">Support for ?PATTERN? without explicit operator has been removed</a><li><a href="#defined(%40array)-and-defined(%25hash)-are-now-fatal-errors">defined(@array) and defined(%hash) are now fatal errors</a><li><a href="#Using-a-hash-or-an-array-as-a-reference-are-now-fatal-errors">Using a hash or an array as a reference are now fatal errors</a><li><a href="#Changes-to-the-*-prototype">Changes to the * prototype</a></ul><li><a href="#Deprecations">Deprecations</a><ul><li><a href="#Setting-%24%7b%5eENCODING%7d-to-anything-but-undef">Setting ${^ENCODING} to anything but undef</a><li><a href="#Use-of-non-graphic-characters-in-single-character-variable-names">Use of non-graphic characters in single-character variable names</a><li><a href="#Inlining-of-sub-()-%7b-%24var-%7d-with-observable-side-effects">Inlining of sub () { $var } with observable side-effects</a><li><a href="#Use-of-multiple-%2fx-regexp-modifiers">Use of multiple /x regexp modifiers</a><li><a href="#Using-a-NO-BREAK-space-in-a-character-alias-for-%5cN%7b...%7d-is-now-deprecated">Using a NO-BREAK space in a character alias for \N{...} is now deprecated</a><li><a href="#A-literal-%22%7b%22-should-now-be-escaped-in-a-pattern">A literal "{" should now be escaped in a pattern</a><li><a href="#Making-all-warnings-fatal-is-discouraged">Making all warnings fatal is discouraged</a></ul><li><a href="#Performance-Enhancements">Performance Enhancements</a><li><a href="#Modules-and-Pragmata">Modules and Pragmata</a><ul><li><a href="#Updated-Modules-and-Pragmata">Updated Modules and Pragmata</a><li><a href="#Removed-Modules-and-Pragmata">Removed Modules and Pragmata</a></ul><li><a href="#Documentation">Documentation</a><ul><li><a href="#New-Documentation">New Documentation</a><li><a href="#Changes-to-Existing-Documentation">Changes to Existing Documentation</a></ul><li><a href="#Diagnostics">Diagnostics</a><ul><li><a href="#New-Diagnostics">New Diagnostics</a><li><a href="#Changes-to-Existing-Diagnostics">Changes to Existing Diagnostics</a><li><a href="#Diagnostic-Removals">Diagnostic Removals</a></ul><li><a href="#Utility-Changes">Utility Changes</a><ul><li><a href="#_find2perl_%2c-_s2p_-and-_a2p_-removal">_find2perl_, _s2p_ and _a2p_ removal</a><li><a href="#the-h2ph-manpage">the h2ph manpage</a><li><a href="#the-encguess-manpage">the encguess manpage</a></ul><li><a href="#Configuration-and-Compilation">Configuration and Compilation</a><li><a href="#Testing">Testing</a><li><a href="#Platform-Support">Platform Support</a><ul><li><a href="#Regained-Platforms">Regained Platforms</a><li><a href="#Discontinued-Platforms">Discontinued Platforms</a><li><a href="#Platform-Specific-Notes">Platform-Specific Notes</a></ul><li><a href="#Internal-Changes">Internal Changes</a><li><a href="#Selected-Bug-Fixes">Selected Bug Fixes</a><li><a href="#Known-Problems">Known Problems</a><li><a href="#Obituary">Obituary</a><li><a href="#Acknowledgements">Acknowledgements</a><li><a href="#Reporting-Bugs">Reporting Bugs</a><li><a href="#SEE-ALSO">SEE ALSO</a></ul><a name="NAME"></a><h1>NAME</h1>
<p>perldelta - what is new for perl v5.22.0</p>
<a name="DESCRIPTION"></a><h1>DESCRIPTION</h1>
<p>This document describes differences between the 5.20.0 release and the 5.22.0
release.</p>
<p>If you are upgrading from an earlier release such as 5.18.0, first read
<a href="perl5200delta.html">perl5200delta</a>, which describes differences between 5.18.0 and 5.20.0.</p>
<a name="Core-Enhancements"></a><h1>Core Enhancements</h1>
<a name="New-bitwise-operators"></a><h2>New bitwise operators</h2>
<p>A new experimental facility has been added that makes the four standard
bitwise operators (<code class="inline"><span class="i">& |</span> ^ ~</code>
) treat their operands consistently as
numbers, and introduces four new dotted operators (<code class="inline"><span class="i">&.</span> |. ^. ~.</code>
) that
treat their operands consistently as strings. The same applies to the
assignment variants (<code class="inline">&= |= ^= <span class="i">&.</span>= |.= ^.=</code>
).</p>
<p>To use this, enable the "bitwise" feature and disable the
"experimental::bitwise" warnings category. See <a href="perlop.html#Bitwise-String-Operators">Bitwise String Operators in perlop</a> for details.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123466">[perl #123466]</a>.</p>
<a name="New-double-diamond-operator"></a><h2>New double-diamond operator</h2>
<p><code class="inline"><span class="h"><<</span>>></code>
is like <code class="inline"><></code>
but uses three-argument <code class="inline"><a class="l_k" href="functions/open.html">open</a></code> to open
each file in <code class="inline"><span class="i">@ARGV</span></code>
. This means that each element of <code class="inline"><span class="i">@ARGV</span></code>
will be treated
as an actual file name, and <code class="inline"><span class="q">"|foo"</span></code>
won't be treated as a pipe open.</p>
<a name="New-%5cb-boundaries-in-regular-expressions"></a><h2>New <code class="inline">\<span class="w">b</span></code>
boundaries in regular expressions</h2>
<a name="qr%2f%5cb%7bgcb%7d%2f"></a><h3><code class="inline"><a class="l_k" href="functions/qr.html">qr/\b{gcb}/</a></code></h3>
<p><code class="inline"><span class="w">gcb</span></code>
stands for Grapheme Cluster Boundary. It is a Unicode property
that finds the boundary between sequences of characters that look like a
single character to a native speaker of a language. Perl has long had
the ability to deal with these through the <code class="inline">\<span class="w">X</span></code>
regular escape
sequence. Now, there is an alternative way of handling these. See
<a href="perlrebackslash.html#%5cb%7b%7d%2c-%5cb%2c-%5cB%7b%7d%2c-%5cB">\b{}, \b, \B{}, \B in perlrebackslash</a> for details.</p>
<a name="qr%2f%5cb%7bwb%7d%2f"></a><h3><code class="inline"><a class="l_k" href="functions/qr.html">qr/\b{wb}/</a></code></h3>
<p><code class="inline"><span class="w">wb</span></code>
stands for Word Boundary. It is a Unicode property
that finds the boundary between words. This is similar to the plain
<code class="inline">\<span class="w">b</span></code>
(without braces) but is more suitable for natural language
processing. It knows, for example, that apostrophes can occur in the
middle of words. See <a href="perlrebackslash.html#%5cb%7b%7d%2c-%5cb%2c-%5cB%7b%7d%2c-%5cB">\b{}, \b, \B{}, \B in perlrebackslash</a> for details.</p>
<a name="qr%2f%5cb%7bsb%7d%2f"></a><h3><code class="inline"><a class="l_k" href="functions/qr.html">qr/\b{sb}/</a></code></h3>
<p><code class="inline"><span class="w">sb</span></code>
stands for Sentence Boundary. It is a Unicode property
to aid in parsing natural language sentences.
See <a href="perlrebackslash.html#%5cb%7b%7d%2c-%5cb%2c-%5cB%7b%7d%2c-%5cB">\b{}, \b, \B{}, \B in perlrebackslash</a> for details.</p>
<a name="Non-Capturing-Regular-Expression-Flag"></a><h2>Non-Capturing Regular Expression Flag</h2>
<p>Regular expressions now support a <code class="inline"><span class="q">/n</span></code>
flag that disables capturing
and filling in <code class="inline"><span class="i">$1</span></code>
, <code class="inline"><span class="i">$2</span></code>
, etc inside of groups:</p>
<pre class="verbatim"><ol><li> <span class="q">"hello"</span> =~ <span class="q">/(hi|hello)/</span><span class="w">n</span><span class="sc">;</span> <span class="c"># $1 is not set</span></li></ol></pre><p>This is equivalent to putting <code class="inline">?:</code> at the beginning of every capturing group.</p>
<p>See <a href="perlre.html#n">n in perlre</a> for more information.</p>
<a name="use-re-'strict'"></a><h2><code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">re</span> <span class="q">'strict'</span></code>
</h2>
<p>This applies stricter syntax rules to regular expression patterns
compiled within its scope. This will hopefully alert you to typos and
other unintentional behavior that backwards-compatibility issues prevent
us from reporting in normal regular expression compilations. Because the
behavior of this is subject to change in future Perl releases as we gain
experience, using this pragma will raise a warning of category
<code class="inline"><span class="w">experimental::re_strict</span></code>
.
See <a href="re.html#'strict'-mode">'strict' in re</a>.</p>
<a name="Unicode-7.0-(with-correction)-is-now-supported"></a><h2>Unicode 7.0 (with correction) is now supported</h2>
<p>For details on what is in this release, see
<a href="http://www.unicode.org/versions/Unicode7.0.0/">http://www.unicode.org/versions/Unicode7.0.0/</a>.
The version of Unicode 7.0 that comes with Perl includes
a correction dealing with glyph shaping in Arabic
(see <a href="http://www.unicode.org/errata/#current_errata">http://www.unicode.org/errata/#current_errata</a>).</p>
<a name="use-locale-can-restrict-which-locale-categories-are-affected"></a><h2><code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">locale</span></code>
can restrict which locale categories are affected</h2>
<p>It is now possible to pass a parameter to <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">locale</span></code>
to specify
a subset of locale categories to be locale-aware, with the remaining
ones unaffected. See <a href="perllocale.html#The-%22use-locale%22-pragma">The use locale pragma in perllocale</a> for details.</p>
<a name="Perl-now-supports-POSIX-2008-locale-currency-additions"></a><h2>Perl now supports POSIX 2008 locale currency additions</h2>
<p>On platforms that are able to handle POSIX.1-2008, the
hash returned by
<a href="perllocale.html#The-localeconv-function">POSIX::localeconv() </a>
includes the international currency fields added by that version of the
POSIX standard. These are
<code class="inline"><span class="w">int_n_cs_precedes</span></code>
,
<code class="inline"><span class="w">int_n_sep_by_space</span></code>
,
<code class="inline"><span class="w">int_n_sign_posn</span></code>
,
<code class="inline"><span class="w">int_p_cs_precedes</span></code>
,
<code class="inline"><span class="w">int_p_sep_by_space</span></code>
,
and
<code class="inline"><span class="w">int_p_sign_posn</span></code>
.</p>
<a name="Better-heuristics-on-older-platforms-for-determining-locale-UTF-8ness"></a><h2>Better heuristics on older platforms for determining locale UTF-8ness</h2>
<p>On platforms that implement neither the C99 standard nor the POSIX 2001
standard, determining if the current locale is UTF-8 or not depends on
heuristics. These are improved in this release.</p>
<a name="Aliasing-via-reference"></a><h2>Aliasing via reference</h2>
<p>Variables and subroutines can now be aliased by assigning to a reference:</p>
<pre class="verbatim"><ol><li> \<span class="i">$c</span> = \<span class="i">$d</span><span class="sc">;</span></li><li> \<span class="i">&x</span> = \<span class="i">&y</span><span class="sc">;</span></li></ol></pre><p>Aliasing can also be accomplished
by using a backslash before a <code class="inline">foreach</code>
iterator variable; this is
perhaps the most useful idiom this feature provides:</p>
<pre class="verbatim"><ol><li> <a class="l_k" href="functions/foreach.html">foreach</a> \<span class="i">%hash</span> <span class="s">(</span><span class="i">@array_of_hash_refs</span><span class="s">)</span> <span class="s">{</span> ... <span class="s">}</span></li></ol></pre><p>This feature is experimental and must be enabled via <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">feature</span>
<span class="q">'refaliasing'</span></code>
. It will warn unless the <code class="inline"><span class="w">experimental::refaliasing</span></code>
warnings category is disabled.</p>
<p>See <a href="perlref.html#Assigning-to-References">Assigning to References in perlref</a></p>
<a name="prototype-with-no-arguments"></a><h2><code class="inline"><a class="l_k" href="functions/prototype.html">prototype</a></code> with no arguments</h2>
<p><code class="inline"><a class="l_k" href="functions/prototype.html">prototype()</a></code> with no arguments now infers <code class="inline"><span class="i">$_</span></code>
.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123514">[perl #123514]</a>.</p>
<a name="New-%3aconst-subroutine-attribute"></a><h2>New <code class="inline"><span class="j">:</span><span class="w">const</span></code>
subroutine attribute</h2>
<p>The <code class="inline"><span class="w">const</span></code>
attribute can be applied to an anonymous subroutine. It
causes the new sub to be executed immediately whenever one is created
(<i>i.e.</i> when the <code class="inline"><a class="l_k" href="functions/sub.html">sub</a></code> expression is evaluated). Its value is captured
and used to create a new constant subroutine that is returned. This
feature is experimental. See <a href="perlsub.html#Constant-Functions">Constant Functions in perlsub</a>.</p>
<a name="fileno-now-works-on-directory-handles"></a><h2><code class="inline"><a class="l_k" href="functions/fileno.html">fileno</a></code> now works on directory handles</h2>
<p>When the relevant support is available in the operating system, the
<code class="inline"><a class="l_k" href="functions/fileno.html">fileno</a></code> builtin now works on directory handles, yielding the
underlying file descriptor in the same way as for filehandles. On
operating systems without such support, <code class="inline"><a class="l_k" href="functions/fileno.html">fileno</a></code> on a directory handle
continues to return the undefined value, as before, but also sets <code class="inline"><span class="i">$!</span></code>
to
indicate that the operation is not supported.</p>
<p>Currently, this uses either a <code class="inline"><span class="w">dd_fd</span></code>
member in the OS <code class="inline"><span class="w">DIR</span></code>
structure, or a <code class="inline"><span class="i">dirfd</span><span class="s">(</span><span class="n">3</span><span class="s">)</span></code>
function as specified by POSIX.1-2008.</p>
<a name="List-form-of-pipe-open-implemented-for-Win32"></a><h2>List form of pipe open implemented for Win32</h2>
<p>The list form of pipe:</p>
<pre class="verbatim"><ol><li> <a class="l_k" href="functions/open.html">open</a> <a class="l_k" href="functions/my.html">my</a> <span class="i">$fh</span><span class="cm">,</span> <span class="q">"-|"</span><span class="cm">,</span> <span class="q">"program"</span><span class="cm">,</span> <span class="i">@arguments</span><span class="sc">;</span></li></ol></pre><p>is now implemented on Win32. It has the same limitations as <code class="inline"><a class="l_k" href="functions/system.html">system</a>
<span class="i">LIST</span></code>
on Win32, since the Win32 API doesn't accept program arguments
as a list.</p>
<a name="Assignment-to-list-repetition"></a><h2>Assignment to list repetition</h2>
<p><code class="inline"><span class="s">(</span>...<span class="s">)</span> x ...</code>
can now be used within a list that is assigned to, as long
as the left-hand side is a valid lvalue. This allows <code class="inline"><span class="s">(</span><a class="l_k" href="functions/undef.html">undef</a><span class="cm">,</span><a class="l_k" href="functions/undef.html">undef</a><span class="cm">,</span><span class="i">$foo</span><span class="s">)</span>
= <span class="i">that_function</span><span class="s">(</span><span class="s">)</span></code>
to be written as <code class="inline"><span class="s">(</span><span class="s">(</span><a class="l_k" href="functions/undef.html">undef</a><span class="s">)</span><span class="n">x2</span><span class="cm">,</span> <span class="i">$foo</span><span class="s">)</span> = <span class="i">that_function</span><span class="s">(</span><span class="s">)</span></code>
.</p>
<a name="Infinity-and-NaN-(not-a-number)-handling-improved"></a><h2>Infinity and NaN (not-a-number) handling improved</h2>
<p>Floating point values are able to hold the special values infinity, negative
infinity, and NaN (not-a-number). Now we more robustly recognize and
propagate the value in computations, and on output normalize them to the strings
<code class="inline"><span class="w">Inf</span></code>
, <code class="inline">-<span class="w">Inf</span></code>
, and <code class="inline"><span class="w">NaN</span></code>
.</p>
<p>See also the <a href="POSIX.html">POSIX</a> enhancements.</p>
<a name="Floating-point-parsing-has-been-improved"></a><h2>Floating point parsing has been improved</h2>
<p>Parsing and printing of floating point values has been improved.</p>
<p>As a completely new feature, hexadecimal floating point literals
(like <code class="inline"><span class="n">0x1</span>.<span class="n">23</span><span class="w">p</span>-<span class="n">4</span></code>
) are now supported, and they can be output with
<code class="inline"><a class="l_k" href="functions/printf.html">printf</a> <span class="q">"%a"</span></code>
. See <a href="perldata.html#Scalar-value-constructors">Scalar value constructors in perldata</a> for more
details.</p>
<a name="Packing-infinity-or-not-a-number-into-a-character-is-now-fatal"></a><h2>Packing infinity or not-a-number into a character is now fatal</h2>
<p>Before, when trying to pack infinity or not-a-number into a
(signed) character, Perl would warn, and assumed you tried to
pack <code class="inline"><span class="n">0xFF</span></code>
; if you gave it as an argument to <code class="inline"><a class="l_k" href="functions/chr.html">chr</a></code>,
<code class="inline"><span class="w">U</span>+<span class="w">FFFD</span></code>
was returned.</p>
<p>But now, all such actions (<code class="inline"><a class="l_k" href="functions/pack.html">pack</a></code>, <code class="inline"><a class="l_k" href="functions/chr.html">chr</a></code>, and <code class="inline"><a class="l_k" href="functions/print.html">print</a> <span class="q">'%c'</span></code>
)
result in a fatal error.</p>
<a name="Experimental-C-Backtrace-API"></a><h2>Experimental C Backtrace API</h2>
<p>Perl now supports (via a C level API) retrieving
the C level backtrace (similar to what symbolic debuggers like gdb do).</p>
<p>The backtrace returns the stack trace of the C call frames,
with the symbol names (function names), the object names (like "perl"),
and if it can, also the source code locations (<a href="file:line">file:line</a>).</p>
<p>The supported platforms are Linux and OS X (some *BSD might work at
least partly, but they have not yet been tested).</p>
<p>The feature needs to be enabled with <code class="inline"><span class="w">Configure</span> -<span class="w">Dusecbacktrace</span></code>
.</p>
<p>See <a href="perlhacktips.html#C-backtrace">C backtrace in perlhacktips</a> for more information.</p>
<a name="Security"></a><h1>Security</h1>
<a name="Perl-is-now-compiled-with--fstack-protector-strong-if-available"></a><h2>Perl is now compiled with <code class="inline">-<span class="w">fstack</span>-<span class="w">protector</span>-<span class="w">strong</span></code>
if available</h2>
<p>Perl has been compiled with the anti-stack-smashing option
<code class="inline">-<span class="w">fstack</span>-<span class="w">protector</span></code>
since 5.10.1. Now Perl uses the newer variant
called <code class="inline">-<span class="w">fstack</span>-<span class="w">protector</span>-<span class="w">strong</span></code>
, if available.</p>
<a name="The-the-Safe-manpage-module-could-allow-outside-packages-to-be-replaced"></a><h2>The <a href="Safe.html">Safe</a> module could allow outside packages to be replaced</h2>
<p>Critical bugfix: outside packages could be replaced. <a href="Safe.html">Safe</a> has
been patched to 2.38 to address this.</p>
<a name="Perl-is-now-always-compiled-with--D_FORTIFY_SOURCE%3d2-if-available"></a><h2>Perl is now always compiled with <code class="inline">-<span class="w">D_FORTIFY_SOURCE</span>=<span class="n">2</span></code>
if available</h2>
<p>The 'code hardening' option called <code class="inline"><span class="w">_FORTIFY_SOURCE</span></code>
, available in
gcc 4.*, is now always used for compiling Perl, if available.</p>
<p>Note that this isn't necessarily a huge step since in many platforms
the step had already been taken several years ago: many Linux
distributions (like Fedora) have been using this option for Perl,
and OS X has enforced the same for many years.</p>
<a name="Incompatible-Changes"></a><h1>Incompatible Changes</h1>
<a name="Subroutine-signatures-moved-before-attributes"></a><h2>Subroutine signatures moved before attributes</h2>
<p>The experimental sub signatures feature, as introduced in 5.20, parsed
signatures after attributes. In this release, following feedback from users
of the experimental feature, the positioning has been moved such that
signatures occur after the subroutine name (if any) and before the attribute
list (if any).</p>
<a name="%26-and-%5c%26-prototypes-accepts-only-subs"></a><h2><code class="inline"><span class="i">&</span></code>
and <code class="inline">\<span class="i">&</span></code>
prototypes accepts only subs</h2>
<p>The <code class="inline"><span class="i">&</span></code>
prototype character now accepts only anonymous subs (<code class="inline"><a class="l_k" href="functions/sub.html">sub</a>
<span class="s">{</span>...<span class="s">}</span></code>
), things beginning with <code class="inline">\<span class="i">&</span></code>
, or an explicit <code class="inline"><a class="l_k" href="functions/undef.html">undef</a></code>. Formerly
it erroneously also allowed references to arrays, hashes, and lists.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d4539">[perl #4539]</a>.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123062">[perl #123062]</a>.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123475">[perl #123062]</a>.</p>
<p>In addition, the <code class="inline">\<span class="i">&</span></code>
prototype was allowing subroutine calls, whereas
now it only allows subroutines: <code class="inline"><span class="i">&foo</span></code>
is still permitted as an argument,
while <code class="inline"><span class="i">&foo</span><span class="s">(</span><span class="s">)</span></code>
and <code class="inline"><span class="i">foo</span><span class="s">(</span><span class="s">)</span></code>
no longer are.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d77860">[perl #77860]</a>.</p>
<a name="use-encoding-is-now-lexical"></a><h2><code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">encoding</span></code>
is now lexical</h2>
<p>The <a href="encoding.html">encoding</a> pragma's effect is now limited to lexical scope. This
pragma is deprecated, but in the meantime, it could adversely affect
unrelated modules that are included in the same program; this change
fixes that.</p>
<a name="List-slices-returning-empty-lists"></a><h2>List slices returning empty lists</h2>
<p>List slices now return an empty list only if the original list was empty
(or if there are no indices). Formerly, a list slice would return an empty
list if all indices fell outside the original list; now it returns a list
of <code class="inline"><a class="l_k" href="functions/undef.html">undef</a></code> values in that case.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d114498">[perl #114498]</a>.</p>
<a name="%5cN%7b%7d-with-a-sequence-of-multiple-spaces-is-now-a-fatal-error"></a><h2><code class="inline">\<span class="w">N</span><span class="s">{</span><span class="s">}</span></code>
with a sequence of multiple spaces is now a fatal error</h2>
<p>E.g. <code class="inline">\<span class="i">N</span><span class="s">{</span><span class="w">TOO</span>  <span class="w">MANY</span> <span class="w">SPACES</span><span class="s">}</span></code>
or <code class="inline">\<span class="i">N</span><span class="s">{</span><span class="w">TRAILING</span> <span class="w">SPACE</span> <span class="s">}</span></code>
.
This has been deprecated since v5.18.</p>
<a name="use-UNIVERSAL-'...'-is-now-a-fatal-error"></a><h2><code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">UNIVERSAL</span> <span class="q">'...'</span></code>
is now a fatal error</h2>
<p>Importing functions from <code class="inline"><span class="w">UNIVERSAL</span></code>
has been deprecated since v5.12, and
is now a fatal error. <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">UNIVERSAL</span></code>
without any arguments is still
allowed.</p>
<a name="In-double-quotish-%5cc_X_%2c-_X_-must-now-be-a-printable-ASCII-character"></a><h2>In double-quotish <code class="inline">\c<i>X</i></code>, <i>X</i> must now be a printable ASCII character</h2>
<p>In prior releases, failure to do this raised a deprecation warning.</p>
<a name="Splitting-the-tokens-(%3f-and-(*-in-regular-expressions-is-now-a-fatal-compilation-error."></a><h2>Splitting the tokens <code class="inline"><span class="s">(</span><span class="q">?</span></code>
and <code class="inline"><span class="s">(</span><span class="i">*</span></code>
in regular expressions is now a fatal compilation error.</h2>
<p>These had been deprecated since v5.18.</p>
<a name="qr%2ffoo%2fx-now-ignores-all-Unicode-pattern-white-space"></a><h2><code class="inline"><a class="l_k" href="functions/qr.html">qr/foo/x</a></code> now ignores all Unicode pattern white space</h2>
<p>The <code class="inline">/x</code> regular expression modifier allows the pattern to contain
white space and comments (both of which are ignored) for improved
readability. Until now, not all the white space characters that Unicode
designates for this purpose were handled. The additional ones now
recognized are:</p>
<pre class="verbatim"><ol><li> <span class="w">U</span>+<span class="n">0085</span> <span class="w">NEXT</span> <span class="w">LINE</span></li><li> <span class="w">U</span>+<span class="n">200</span><span class="w">E</span> <span class="w">LEFT</span>-<span class="w">TO</span>-<span class="w">RIGHT</span> <span class="w">MARK</span></li><li> <span class="w">U</span>+<span class="n">200</span><span class="w">F</span> <span class="w">RIGHT</span>-<span class="w">TO</span>-<span class="w">LEFT</span> <span class="w">MARK</span></li><li> <span class="w">U</span>+<span class="n">2028</span> <span class="w">LINE</span> <span class="w">SEPARATOR</span></li><li> <span class="w">U</span>+<span class="n">2029</span> <span class="w">PARAGRAPH</span> <span class="w">SEPARATOR</span></li></ol></pre><p>The use of these characters with <code class="inline">/x</code> outside bracketed character
classes and when not preceded by a backslash has raised a deprecation
warning since v5.18. Now they will be ignored.</p>
<a name="Comment-lines-within-(%3f%5b-%5d)-are-now-ended-only-by-a-%5cn"></a><h2>Comment lines within <code class="inline"><span class="s">(</span><span class="q">?[ ])</span></code>
are now ended only by a <code class="inline">\<span class="w">n</span></code>
</h2>
<p><code class="inline"><span class="s">(</span><span class="q">?[ ])</span></code>
is an experimental feature, introduced in v5.18. It operates
as if <code class="inline">/x</code> is always enabled. But there was a difference: comment
lines (following a <code class="inline"><span class="c">#</span></code>
character) were terminated by anything matching
<code class="inline">\<span class="w">R</span></code>
which includes all vertical whitespace, such as form feeds. For
consistency, this is now changed to match what terminates comment lines
outside <code class="inline"><span class="s">(</span><span class="q">?[ ])</span></code>
, namely a <code class="inline">\<span class="w">n</span></code>
(even if escaped), which is the
same as what terminates a heredoc string and formats.</p>
<a name="(%3f%5b...%5d)-operators-now-follow-standard-Perl-precedence"></a><h2><code class="inline"><span class="s">(</span><span class="q">?[...])</span></code>
operators now follow standard Perl precedence</h2>
<p>This experimental feature allows set operations in regular expression patterns.
Prior to this, the intersection operator had the same precedence as the other
binary operators. Now it has higher precedence. This could lead to different
outcomes than existing code expects (though the documentation has always noted
that this change might happen, recommending fully parenthesizing the
expressions). See <a href="perlrecharclass.html#Extended-Bracketed-Character-Classes">Extended Bracketed Character Classes in perlrecharclass</a>.</p>
<a name="Omitting-%25-and-%40-on-hash-and-array-names-is-no-longer-permitted"></a><h2>Omitting <code class="inline"><span class="i">%</span></code>
and <code class="inline"><span class="i">@</span></code>
on hash and array names is no longer permitted</h2>
<p>Really old Perl let you omit the <code class="inline"><span class="i">@</span></code>
on array names and the <code class="inline"><span class="i">%</span></code>
on hash
names in some spots. This has issued a deprecation warning since Perl
5.000, and is no longer permitted.</p>
<a name="%22%24!%22-text-is-now-in-English-outside-the-scope-of-use-locale"></a><h2><code class="inline"><span class="q">"$!"</span></code>
text is now in English outside the scope of <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">locale</span></code>
</h2>
<p>Previously, the text, unlike almost everything else, always came out
based on the current underlying locale of the program. (Also affected
on some systems is <code class="inline"><span class="q">"$^E"</span></code>
.) For programs that are unprepared to
handle locale differences, this can cause garbage text to be displayed.
It's better to display text that is translatable via some tool than
garbage text which is much harder to figure out.</p>
<a name="%22%24!%22-text-will-be-returned-in-UTF-8-when-appropriate"></a><h2><code class="inline"><span class="q">"$!"</span></code>
text will be returned in UTF-8 when appropriate</h2>
<p>The stringification of <code class="inline"><span class="i">$!</span></code>
and <code class="inline"><span class="i">$^E</span></code>
will have the UTF-8 flag set
when the text is actually non-ASCII UTF-8. This will enable programs
that are set up to be locale-aware to properly output messages in the
user's native language. Code that needs to continue the 5.20 and
earlier behavior can do the stringification within the scopes of both
<code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">bytes</span></code>
and <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">locale</span> <span class="q">":messages"</span></code>
. Within these two
scopes, no other Perl operations will
be affected by locale; only <code class="inline"><span class="i">$!</span></code>
and <code class="inline"><span class="i">$^E</span></code>
stringification. The
<code class="inline"><span class="w">bytes</span></code>
pragma causes the UTF-8 flag to not be set, just as in previous
Perl releases. This resolves
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d112208">[perl #112208]</a>.</p>
<a name="Support-for-%3fPATTERN%3f-without-explicit-operator-has-been-removed"></a><h2>Support for <code class="inline"><span class="q">?PATTERN?</span></code>
without explicit operator has been removed</h2>
<p>The <code class="inline"><a class="l_k" href="functions/m.html">m?PATTERN?</a></code> construct, which allows matching a regex only once,
previously had an alternative form that was written directly with a question
mark delimiter, omitting the explicit <code class="inline"><a class="l_k" href="functions/m.html">m</a></code> operator. This usage has produced
a deprecation warning since 5.14.0. It is now a syntax error, so that the
question mark can be available for use in new operators.</p>
<a name="defined(%40array)-and-defined(%25hash)-are-now-fatal-errors"></a><h2><code class="inline"><a class="l_k" href="functions/defined.html">defined(@array)</a></code> and <code class="inline"><a class="l_k" href="functions/defined.html">defined(%hash)</a></code> are now fatal errors</h2>
<p>These have been deprecated since v5.6.1 and have raised deprecation
warnings since v5.16.</p>
<a name="Using-a-hash-or-an-array-as-a-reference-are-now-fatal-errors"></a><h2>Using a hash or an array as a reference are now fatal errors</h2>
<p>For example, <code class="inline"><span class="i">%foo</span>->{<span class="q">"bar"</span>}</code>
now causes a fatal compilation
error. These have been deprecated since before v5.8, and have raised
deprecation warnings since then.</p>
<a name="Changes-to-the-*-prototype"></a><h2>Changes to the <code class="inline"><span class="i">*</span></code>
prototype</h2>
<p>The <code class="inline"><span class="i">*</span></code>
character in a subroutine's prototype used to allow barewords to take
precedence over most, but not all, subroutine names. It was never
consistent and exhibited buggy behavior.</p>
<p>Now it has been changed, so subroutines always take precedence over barewords,
which brings it into conformity with similarly prototyped built-in functions:</p>
<pre class="verbatim"><ol><li><a name="splat"></a> sub <span class="m">splat(*)</span> <span class="s">{</span> ... <span class="s">}</span></li><li><a name="foo"></a> sub <span class="m">foo</span> <span class="s">{</span> ... <span class="s">}</span></li><li> <span class="i">splat</span><span class="s">(</span><span class="i">foo</span><span class="s">)</span><span class="sc">;</span> <span class="c"># now always splat(foo())</span></li><li> <span class="i">splat</span><span class="s">(</span><span class="w">bar</span><span class="s">)</span><span class="sc">;</span> <span class="c"># still splat('bar') as before</span></li><li> <a class="l_k" href="functions/close.html">close</a><span class="s">(</span><span class="i">foo</span><span class="s">)</span><span class="sc">;</span> <span class="c"># close(foo())</span></li><li> <a class="l_k" href="functions/close.html">close</a><span class="s">(</span><span class="w">bar</span><span class="s">)</span><span class="sc">;</span> <span class="c"># close('bar')</span></li></ol></pre><a name="Deprecations"></a><h1>Deprecations</h1>
<a name="Setting-%24%7b%5eENCODING%7d-to-anything-but-undef"></a><h2>Setting <code class="inline"><span class="i">$</span>{<span class="w">^ENCODING</span>}</code>
to anything but <code class="inline"><a class="l_k" href="functions/undef.html">undef</a></code></h2>
<p>This variable allows Perl scripts to be written in an encoding other than
ASCII or UTF-8. However, it affects all modules globally, leading
to wrong answers and segmentation faults. New scripts should be written
in UTF-8; old scripts should be converted to UTF-8, which is easily done
with the <a href="piconv.html">piconv</a> utility.</p>
<a name="Use-of-non-graphic-characters-in-single-character-variable-names"></a><h2>Use of non-graphic characters in single-character variable names</h2>
<p>The syntax for single-character variable names is more lenient than
for longer variable names, allowing the one-character name to be a
punctuation character or even invisible (a non-graphic). Perl v5.20
deprecated the ASCII-range controls as such a name. Now, all
non-graphic characters that formerly were allowed are deprecated.
The practical effect of this occurs only when not under <code class="inline"><a class="l_k" href="functions/use.html">use</a>
<span class="w">utf8</span></code>
, and affects just the C1 controls (code points 0x80 through
0xFF), NO-BREAK SPACE, and SOFT HYPHEN.</p>
<a name="Inlining-of-sub-()-%7b-%24var-%7d-with-observable-side-effects"></a><h2>Inlining of <code class="inline"><span class="i">sub ()</span> <span class="s">{</span> <span class="i">$var</span> <span class="s">}</span></code>
with observable side-effects</h2>
<p>In many cases Perl makes <code class="inline"><span class="i">sub ()</span> <span class="s">{</span> <span class="i">$var</span> <span class="s">}</span></code>
into an inlinable constant
subroutine, capturing the value of <code class="inline"><span class="i">$var</span></code>
at the time the <code class="inline"><a class="l_k" href="functions/sub.html">sub</a></code> expression
is evaluated. This can break the closure behavior in those cases where
<code class="inline"><span class="i">$var</span></code>
is subsequently modified, since the subroutine won't return the
changed value. (Note that this all only applies to anonymous subroutines
with an empty prototype (<code class="inline"><span class="i">sub ()</span></code>
).)</p>
<p>This usage is now deprecated in those cases where the variable could be
modified elsewhere. Perl detects those cases and emits a deprecation
warning. Such code will likely change in the future and stop producing a
constant.</p>
<p>If your variable is only modified in the place where it is declared, then
Perl will continue to make the sub inlinable with no warnings.</p>
<pre class="verbatim"><ol><li><a name="make_constant"></a> sub <span class="m">make_constant</span> <span class="s">{</span></li><li> <a class="l_k" href="functions/my.html">my</a> <span class="i">$var</span> = <a class="l_k" href="functions/shift.html">shift</a><span class="sc">;</span></li><li> <a class="l_k" href="functions/return.html">return</a> <span class="i">sub ()</span> <span class="s">{</span> <span class="i">$var</span> <span class="s">}</span><span class="sc">;</span> <span class="c"># fine</span></li><li> <span class="s">}</span></li><li></li><li><a name="make_constant_deprecated"></a> sub <span class="m">make_constant_deprecated</span> <span class="s">{</span></li><li> <a class="l_k" href="functions/my.html">my</a> <span class="i">$var</span><span class="sc">;</span></li><li> <span class="i">$var</span> = <a class="l_k" href="functions/shift.html">shift</a><span class="sc">;</span></li><li> <a class="l_k" href="functions/return.html">return</a> <span class="i">sub ()</span> <span class="s">{</span> <span class="i">$var</span> <span class="s">}</span><span class="sc">;</span> <span class="c"># deprecated</span></li><li> <span class="s">}</span></li><li></li><li><a name="make_constant_deprecated2"></a> sub <span class="m">make_constant_deprecated2</span> <span class="s">{</span></li><li> <a class="l_k" href="functions/my.html">my</a> <span class="i">$var</span> = <a class="l_k" href="functions/shift.html">shift</a><span class="sc">;</span></li><li> <span class="i">log_that_value</span><span class="s">(</span><span class="i">$var</span><span class="s">)</span><span class="sc">;</span> <span class="c"># could modify $var</span></li><li> <a class="l_k" href="functions/return.html">return</a> <span class="i">sub ()</span> <span class="s">{</span> <span class="i">$var</span> <span class="s">}</span><span class="sc">;</span> <span class="c"># deprecated</span></li><li> <span class="s">}</span></li></ol></pre><p>In the second example above, detecting that <code class="inline"><span class="i">$var</span></code>
is assigned to only once
is too hard to detect. That it happens in a spot other than the <code class="inline"><a class="l_k" href="functions/my.html">my</a></code>
declaration is enough for Perl to find it suspicious.</p>
<p>This deprecation warning happens only for a simple variable for the body of
the sub. (A <code class="inline">BEGIN</code>
block or <code class="inline"><a class="l_k" href="functions/use.html">use</a></code> statement inside the sub is ignored,
because it does not become part of the sub's body.) For more complex
cases, such as <code class="inline"><span class="i">sub ()</span> <span class="s">{</span> <span class="i">do_something</span><span class="s">(</span><span class="s">)</span> <a class="l_k" href="functions/if.html">if</a> <span class="n">0</span><span class="sc">;</span> <span class="i">$var</span> <span class="s">}</span></code>
the behavior has
changed such that inlining does not happen if the variable is modifiable
elsewhere. Such cases should be rare.</p>
<a name="Use-of-multiple-%2fx-regexp-modifiers"></a><h2>Use of multiple <code class="inline">/x</code> regexp modifiers</h2>
<p>It is now deprecated to say something like any of the following:</p>
<pre class="verbatim"><ol><li> <span class="q">qr/foo/xx</span><span class="sc">;</span></li><li> <span class="q">/(?xax:foo)/</span><span class="sc">;</span></li><li> <a class="l_k" href="functions/use.html">use</a> <span class="w">re</span> <span class="q">qw(/amxx)</span><span class="sc">;</span></li></ol></pre><p>That is, now <code class="inline"><span class="w">x</span></code>
should only occur once in any string of contiguous
regular expression pattern modifiers. We do not believe there are any
occurrences of this in all of CPAN. This is in preparation for a future
Perl release having <code class="inline"><span class="q">/xx</span></code>
permit white-space for readability in
bracketed character classes (those enclosed in square brackets:
<code class="inline"><span class="s">[</span>...<span class="s">]</span></code>
).</p>
<a name="Using-a-NO-BREAK-space-in-a-character-alias-for-%5cN%7b...%7d-is-now-deprecated"></a><h2>Using a NO-BREAK space in a character alias for <code class="inline">\<span class="i">N</span><span class="s">{</span>...<span class="s">}</span></code>
is now deprecated</h2>
<p>This non-graphic character is essentially indistinguishable from a
regular space, and so should not be allowed. See
<a href="charnames.html#CUSTOM-ALIASES">CUSTOM ALIASES in charnames</a>.</p>
<a name="A-literal-%22%7b%22-should-now-be-escaped-in-a-pattern"></a><h2>A literal <code class="inline"><span class="q">"{"</span></code>
should now be escaped in a pattern</h2>
<p>If you want a literal left curly bracket (also called a left brace) in a
regular expression pattern, you should now escape it by either
preceding it with a backslash (<code class="inline"><span class="q">"\{"</span></code>
) or enclosing it within square
brackets <code class="inline"><span class="q">"[{]"</span></code>
, or by using <code class="inline">\<span class="w">Q</span></code>
; otherwise a deprecation warning
will be raised. This was first announced as forthcoming in the v5.16
release; it will allow future extensions to the language to happen.</p>
<a name="Making-all-warnings-fatal-is-discouraged"></a><h2>Making all warnings fatal is discouraged</h2>
<p>The documentation for <a href="warnings.html#Fatal-Warnings">fatal warnings</a> notes that
<code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">warnings</span> <span class="w">FATAL</span> <span class="cm">=></span> <span class="q">'all'</span></code>
is discouraged, and provides stronger
language about the risks of fatal warnings in general.</p>
<a name="Performance-Enhancements"></a><h1>Performance Enhancements</h1>
<ul>
<li>
<p>If a method or class name is known at compile time, a hash is precomputed
to speed up run-time method lookup. Also, compound method names like
<code class="inline"><span class="w">SUPER::new</span></code>
are parsed at compile time, to save having to parse them at
run time.</p>
</li>
<li>
<p>Array and hash lookups (especially nested ones) that use only constants
or simple variables as keys, are now considerably faster. See
<a href="#Internal-Changes">Internal Changes</a> for more details.</p>
</li>
<li>
<p><code class="inline"><span class="s">(</span>...<span class="s">)</span><span class="n">x1</span></code>
, <code class="inline"><span class="s">(</span><span class="q">"constant"</span><span class="s">)</span><span class="n">x0</span></code>
and <code class="inline"><span class="s">(</span><span class="i">$scalar</span><span class="s">)</span><span class="n">x0</span></code>
are now optimised in list
context. If the right-hand argument is a constant 1, the repetition
operator disappears. If the right-hand argument is a constant 0, the whole
expression is optimised to the empty list, so long as the left-hand
argument is a simple scalar or constant. (That is, <code class="inline"><span class="s">(</span><span class="i">foo</span><span class="s">(</span><span class="s">)</span><span class="s">)</span><span class="n">x0</span></code>
is not
subject to this optimisation.)</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/substr.html">substr</a></code> assignment is now optimised into 4-argument <code class="inline"><a class="l_k" href="functions/substr.html">substr</a></code> at the end
of a subroutine (or as the argument to <code class="inline"><a class="l_k" href="functions/return.html">return</a></code>). Previously, this
optimisation only happened in void context.</p>
</li>
<li>
<p>In <code class="inline"><span class="q">"\L..."</span></code>
, <code class="inline"><span class="q">"\Q..."</span></code>
, etc., the extra "stringify" op is now optimised
away, making these just as fast as <code class="inline"><a class="l_k" href="functions/lcfirst.html">lcfirst</a></code>, <code class="inline"><a class="l_k" href="functions/quotemeta.html">quotemeta</a></code>, etc.</p>
</li>
<li>
<p>Assignment to an empty list is now sometimes faster. In particular, it
never calls <code class="inline"><span class="w">FETCH</span></code>
on tied arguments on the right-hand side, whereas it
used to sometimes.</p>
</li>
<li>
<p>There is a performance improvement of up to 20% when <code class="inline"><a class="l_k" href="functions/length.html">length</a></code> is applied to
a non-magical, non-tied string, and either <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">bytes</span></code>
is in scope or the
string doesn't use UTF-8 internally.</p>
</li>
<li>
<p>On most perl builds with 64-bit integers, memory usage for non-magical,
non-tied scalars containing only a floating point value has been reduced
by between 8 and 32 bytes, depending on OS.</p>
</li>
<li>
<p>In <code class="inline"><span class="i">@array</span> = <a class="l_k" href="functions/split.html">split</a></code>
, the assignment can be optimized away, so that <code class="inline"><a class="l_k" href="functions/split.html">split</a></code>
writes directly to the array. This optimisation was happening only for
package arrays other than <code class="inline"><span class="i">@_</span></code>
, and only sometimes. Now this
optimisation happens almost all the time.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/join.html">join</a></code> is now subject to constant folding. So for example
<code class="inline"><a class="l_k" href="functions/join.html">join</a> <span class="q">"-"</span><span class="cm">,</span> <span class="q">"a"</span><span class="cm">,</span> <span class="q">"b"</span></code>
is converted at compile-time to <code class="inline"><span class="q">"a-b"</span></code>
.
Moreover, <code class="inline"><a class="l_k" href="functions/join.html">join</a></code> with a scalar or constant for the separator and a
single-item list to join is simplified to a stringification, and the
separator doesn't even get evaluated.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/qq.html">qq(@array)</a></code> is implemented using two ops: a stringify op and a join op.
If the <code class="inline"><a class="l_k" href="functions/qq.html">qq</a></code> contains nothing but a single array, the stringification is
optimized away.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/our.html">our</a> <span class="i">$var</span></code>
and <code class="inline"><a class="l_k" href="functions/our.html">our($s,@a,%h)</a></code> in void context are no longer evaluated at
run time. Even a whole sequence of <code class="inline"><a class="l_k" href="functions/our.html">our</a> <span class="i">$foo</span><span class="sc">;</span></code>
statements will simply be
skipped over. The same applies to <code class="inline"><a class="l_k" href="functions/state.html">state</a></code> variables.</p>
</li>
<li>
<p>Many internal functions have been refactored to improve performance and reduce
their memory footprints.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121436">[perl #121436]</a>
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121906">[perl #121906]</a>
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121969">[perl #121969]</a></p>
</li>
<li>
<p><code class="inline">-T</code>
and <code class="inline">-B</code>
filetests will return sooner when an empty file is detected.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121489">[perl #121489]</a></p>
</li>
<li>
<p>Hash lookups where the key is a constant are faster.</p>
</li>
<li>
<p>Subroutines with an empty prototype and a body containing just <code class="inline"><a class="l_k" href="functions/undef.html">undef</a></code> are now
eligible for inlining.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122728">[perl #122728]</a></p>
</li>
<li>
<p>Subroutines in packages no longer need to be stored in typeglobs:
declaring a subroutine will now put a simple sub reference directly in the
stash if possible, saving memory. The typeglob still notionally exists,
so accessing it will cause the stash entry to be upgraded to a typeglob
(<i>i.e.</i> this is just an internal implementation detail).
This optimization does not currently apply to XSUBs or exported
subroutines, and method calls will undo it, since they cache things in
typeglobs.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d120441">[perl #120441]</a></p>
</li>
<li>
<p>The functions <code class="inline"><span class="i">utf8::native_to_unicode</span><span class="s">(</span><span class="s">)</span></code>
and <code class="inline"><span class="i">utf8::unicode_to_native</span><span class="s">(</span><span class="s">)</span></code>
(see <a href="utf8.html">utf8</a>) are now optimized out on ASCII platforms. There is now not even
a minimal performance hit in writing code portable between ASCII and EBCDIC
platforms.</p>
</li>
<li>
<p>Win32 Perl uses 8 KB less of per-process memory than before for every perl
process, because some data is now memory mapped from disk and shared
between processes from the same perl binary.</p>
</li>
</ul>
<a name="Modules-and-Pragmata"></a><h1>Modules and Pragmata</h1>
<a name="Updated-Modules-and-Pragmata"></a><h2>Updated Modules and Pragmata</h2>
<p>Many of the libraries distributed with perl have been upgraded since v5.20.0.
For a complete list of changes, run:</p>
<pre class="verbatim"><ol><li> <span class="w">corelist</span> --<span class="w">diff</span> <span class="v">5.20.0</span> <span class="v">5.22.0</span></li></ol></pre><p>You can substitute your favorite version in place of 5.20.0, too.</p>
<p>Some notable changes include:</p>
<ul>
<li>
<p><a href="Archive/Tar.html">Archive::Tar</a> has been upgraded to version 2.04.</p>
<p>Tests can now be run in parallel.</p>
</li>
<li>
<p><a href="attributes.html">attributes</a> has been upgraded to version 0.27.</p>
<p>The usage of <code class="inline"><span class="w">memEQs</span></code>
in the XS has been corrected.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122701">[perl #122701]</a></p>
<p>Avoid reading beyond the end of a buffer. [perl #122629]</p>
</li>
<li>
<p><a href="B.html">B</a> has been upgraded to version 1.58.</p>
<p>It provides a new <code class="inline"><span class="w">B::safename</span></code>
function, based on the existing
<code class="inline"><span class="w">B::GV</span><span class="w">->SAFENAME</span></code>
, that converts <code class="inline">\<span class="w">cOPEN</span></code>
to <code class="inline">^<span class="w">OPEN</span></code>
.</p>
<p>Nulled COPs are now of class <code class="inline"><span class="w">B::COP</span></code>
, rather than <code class="inline"><span class="w">B::OP</span></code>
.</p>
<p><code class="inline"><span class="w">B::REGEXP</span></code>
objects now provide a <code class="inline"><span class="w">qr_anoncv</span></code>
method for accessing the
implicit CV associated with <code class="inline"><a class="l_k" href="functions/qr.html">qr//</a></code> things containing code blocks, and a
<code class="inline"><span class="w">compflags</span></code>
method that returns the pertinent flags originating from the
<code class="inline"><a class="l_k" href="functions/qr.html">qr//blahblah</a></code> op.</p>
<p><code class="inline"><span class="w">B::PMOP</span></code>
now provides a <code class="inline"><span class="w">pmregexp</span></code>
method returning a <code class="inline"><span class="w">B::REGEXP</span></code>
object.
Two new classes, <code class="inline"><span class="w">B::PADNAME</span></code>
and <code class="inline"><span class="w">B::PADNAMELIST</span></code>
, have been introduced.</p>
<p>A bug where, after an ithread creation or psuedofork, special/immortal SVs in
the child ithread/psuedoprocess did not have the correct class of
<code class="inline"><span class="w">B::SPECIAL</span></code>
, has been fixed.
The <code class="inline"><span class="w">id</span></code>
and <code class="inline"><span class="w">outid</span></code>
PADLIST methods have been added.</p>
</li>
<li>
<p><a href="B/Concise.html">B::Concise</a> has been upgraded to version 0.996.</p>
<p>Null ops that are part of the execution chain are now given sequence
numbers.</p>
<p>Private flags for nulled ops are now dumped with mnemonics as they would be
for the non-nulled counterparts.</p>
</li>
<li>
<p><a href="B/Deparse.html">B::Deparse</a> has been upgraded to version 1.35.</p>
<p>It now deparses <code class="inline">+<span class="i">sub </span><span class="co">:</span> <span class="w">attr</span> <span class="s">{</span> ... <span class="s">}</span></code>
correctly at the start of a
statement. Without the initial <code class="inline">+</code>
, <code class="inline"><a class="l_k" href="functions/sub.html">sub</a></code> would be a statement label.</p>
<p><code class="inline">BEGIN</code>
blocks are now emitted in the right place most of the time, but
the change unfortunately introduced a regression, in that <code class="inline">BEGIN</code>
blocks
occurring just before the end of the enclosing block may appear below it
instead.</p>
<p><code class="inline"><span class="w">B::Deparse</span></code>
no longer puts erroneous <code class="inline"><a class="l_k" href="functions/local.html">local</a></code> here and there, such as for
<code class="inline"><span class="w">LIST</span> = <span class="q">tr/a//d</span></code>
. [perl #119815]</p>
<p>Adjacent <code class="inline"><a class="l_k" href="functions/use.html">use</a></code> statements are no longer accidentally nested if one
contains a <code class="inline"><a class="l_k" href="functions/do.html">do</a></code> block. [perl #115066]</p>
<p>Parenthesised arrays in lists passed to <code class="inline">\</code>
are now correctly deparsed
with parentheses (<i>e.g.</i>, <code class="inline">\<span class="s">(</span><span class="i">@a</span><span class="cm">,</span> <span class="s">(</span><span class="i">@b</span><span class="s">)</span><span class="cm">,</span> <span class="i">@c</span><span class="s">)</span></code>
now retains the parentheses
around @b), thus preserving the flattening behavior of referenced
parenthesised arrays. Formerly, it only worked for one array: <code class="inline">\<span class="s">(</span><span class="i">@a</span><span class="s">)</span></code>
.</p>
<p><code class="inline"><a class="l_k" href="functions/local.html">local</a> <a class="l_k" href="functions/our.html">our</a></code>
is now deparsed correctly, with the <code class="inline"><a class="l_k" href="functions/our.html">our</a></code> included.</p>
<p><code class="inline"><a class="l_k" href="functions/for.html">for</a><span class="s">(</span><span class="i">$foo</span><span class="sc">;</span> !<span class="i">$bar</span><span class="sc">;</span> <span class="i">$baz</span><span class="s">)</span> <span class="s">{</span>...<span class="s">}</span></code>
was deparsed without the <code class="inline">!</code>
(or <code class="inline">not</code>
).
This has been fixed.</p>
<p>Core keywords that conflict with lexical subroutines are now deparsed with
the <code class="inline"><span class="w">CORE::</span></code>
prefix.</p>
<p><code class="inline"><a class="l_k" href="functions/foreach.html">foreach</a> <span class="w">state</span> <span class="i">$x</span> <span class="s">(</span>...<span class="s">)</span> <span class="s">{</span>...<span class="s">}</span></code>
now deparses correctly with <code class="inline"><a class="l_k" href="functions/state.html">state</a></code> and
not <code class="inline"><a class="l_k" href="functions/my.html">my</a></code>.</p>
<p><code class="inline"><a class="l_k" href="functions/our.html">our</a> <span class="i">@array</span> = <a class="l_k" href="functions/split.html">split</a><span class="s">(</span>...<span class="s">)</span></code>
now deparses correctly with <code class="inline"><a class="l_k" href="functions/our.html">our</a></code> in those
cases where the assignment is optimized away.</p>
<p>It now deparses <code class="inline">our(<i>LIST</i>)</code> and typed lexical (<code class="inline"><a class="l_k" href="functions/my.html">my</a> <span class="w">Dog</span> <span class="i">$spot</span></code>
) correctly.</p>
<p>Deparse <code class="inline"><span class="i">$#_</span></code>
as that instead of as <code class="inline"><span class="i">$#</span>{<span class="w">_</span>}</code>
.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123947">[perl #123947]</a></p>
<p>BEGIN blocks at the end of the enclosing scope are now deparsed in the
right place. [perl #77452]</p>
<p>BEGIN blocks were sometimes deparsed as __ANON__, but are now always called
BEGIN.</p>
<p>Lexical subroutines are now fully deparsed. [perl #116553]</p>
<p><code class="inline"><span class="w">Anything</span> =~ <span class="q">y///</span><span class="w">r</span></code>
with <code class="inline"><span class="q">/r</span></code>
no longer omits the left-hand operand.</p>
<p>The op trees that make up regexp code blocks are now deparsed for real.
Formerly, the original string that made up the regular expression was used.
That caused problems with <code class="inline"><a class="l_k" href="functions/qr.html">qr/(?{<<heredoc})/</a></code> and multiline code blocks,
which were deparsed incorrectly. [perl #123217] [perl #115256]</p>
<p><code class="inline"><span class="i">$;</span></code>
at the end of a statement no longer loses its semicolon.
[perl #123357]</p>
<p>Some cases of subroutine declarations stored in the stash in shorthand form
were being omitted.</p>
<p>Non-ASCII characters are now consistently escaped in strings, instead of
some of the time. (There are still outstanding problems with regular
expressions and identifiers that have not been fixed.)</p>
<p>When prototype sub calls are deparsed with <code class="inline"><span class="i">&</span></code>
(<i>e.g.</i>, under the <b>-P</b>
option), <code class="inline"><a class="l_k" href="functions/scalar.html">scalar</a></code> is now added where appropriate, to force the scalar
context implied by the prototype.</p>
<p><code class="inline"><a class="l_k" href="functions/require.html">require(foo())</a></code>, <code class="inline"><a class="l_k" href="functions/do.html">do(foo())</a></code>, <code class="inline"><a class="l_k" href="functions/goto.html">goto(foo())</a></code> and similar constructs with
loop controls are now deparsed correctly. The outer parentheses are not
optional.</p>
<p>Whitespace is no longer escaped in regular expressions, because it was
getting erroneously escaped within <code class="inline"><span class="s">(</span><span class="q">?x:...)</span></code>
sections.</p>
<p><code class="inline"><a name="foo"></a>sub <span class="m">foo</span> <span class="s">{</span> <span class="i">foo</span><span class="s">(</span><span class="s">)</span> <span class="s">}</span></code>
is now deparsed with those mandatory parentheses.</p>
<p><code class="inline"><span class="q">/@array/</span></code>
is now deparsed as a regular expression, and not just
<code class="inline"><span class="i">@array</span></code>
.</p>
<p><code class="inline"><span class="q">/@{-}/</span></code>
, <code class="inline"><span class="q">/@{+}/</span></code>
and <code class="inline"><span class="i">$#</span>{<span class="n">1</span>}</code>
are now deparsed with the braces, which
are mandatory in these cases.</p>
<p>In deparsing feature bundles, <code class="inline"><span class="w">B::Deparse</span></code>
was emitting <code class="inline"><a class="l_k" href="functions/no.html">no</a> <span class="w">feature</span><span class="sc">;</span></code>
first
instead of <code class="inline"><a class="l_k" href="functions/no.html">no</a> <span class="w">feature</span> <span class="q">':all'</span><span class="sc">;</span></code>
. This has been fixed.</p>
<p><code class="inline"><a class="l_k" href="functions/chdir.html">chdir</a> <span class="w">FH</span></code>
is now deparsed without quotation marks.</p>
<p><code class="inline">\<a class="l_k" href="functions/my.html">my</a> <span class="i">@a</span></code>
is now deparsed without parentheses. (Parenthese would flatten
the array.)</p>
<p><code class="inline"><a class="l_k" href="functions/system.html">system</a></code> and <code class="inline"><a class="l_k" href="functions/exec.html">exec</a></code> followed by a block are now deparsed correctly.
Formerly there was an erroneous <code class="inline"><a class="l_k" href="functions/do.html">do</a></code> before the block.</p>
<p><code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">constant</span> <span class="i">QR</span> <span class="cm">=></span> <span class="q">qr/.../</span><span class="w">flags</span></code>
followed by <code class="inline"><span class="q">""</span> =~ <span class="w">QR</span></code>
is no longer
without the flags.</p>
<p>Deparsing <code class="inline"><a class="l_k" href="functions/BEGIN.html">BEGIN</a> <span class="s">{</span> <a class="l_k" href="functions/undef.html">undef</a> <span class="i">&foo</span> <span class="s">}</span></code>
with the <b>-w</b> switch enabled started to
emit 'uninitialized' warnings in Perl 5.14. This has been fixed.</p>
<p>Deparsing calls to subs with a <code class="inline"><span class="s">(</span><span class="sc">;</span>+<span class="s">)</span></code>
prototype resulted in an infinite
loop. The <code class="inline"><span class="s">(</span><span class="sc">;</span><span class="i">$</span></code>
) <code class="inline"><span class="s">(</span><span class="w">_</span><span class="s">)</span></code>
and <code class="inline"><span class="s">(</span><span class="sc">;</span><span class="w">_</span><span class="s">)</span></code>
prototypes were given the wrong
precedence, causing <code class="inline"><span class="i">foo</span><span class="s">(</span><span class="i">$a</span><<span class="i">$b</span><span class="s">)</span></code>
to be deparsed without the parentheses.</p>
<p>Deparse now provides a defined state sub in inner subs.</p>
</li>
<li>
<p><a href="B/Op_private.html">B::Op_private</a> has been added.</p>
<p><a href="B/Op_private.html">B::Op_private</a> provides detailed information about the flags used in the
<code class="inline"><span class="w">op_private</span></code>
field of perl opcodes.</p>
</li>
<li>
<p><a href="bigint.html">bigint</a>, <a href="bignum.html">bignum</a>, <a href="bigrat.html">bigrat</a> have been upgraded to version 0.39.</p>
<p>Document in CAVEATS that using strings as numbers won't always invoke
the big number overloading, and how to invoke it. [rt.perl.org #123064]</p>
</li>
<li>
<p><a href="Carp.html">Carp</a> has been upgraded to version 1.36.</p>
<p><code class="inline"><span class="w">Carp::Heavy</span></code>
now ignores version mismatches with Carp if Carp is newer
than 1.12, since <code class="inline"><span class="w">Carp::Heavy</span></code>
's guts were merged into Carp at that
point.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121574">[perl #121574]</a></p>
<p>Carp now handles non-ASCII platforms better.</p>
<p>Off-by-one error fix for Perl < 5.14.</p>
</li>
<li>
<p><a href="constant.html">constant</a> has been upgraded to version 1.33.</p>
<p>It now accepts fully-qualified constant names, allowing constants to be defined
in packages other than the caller.</p>
</li>
<li>
<p><a href="CPAN.html">CPAN</a> has been upgraded to version 2.11.</p>
<p>Add support for <code class="inline"><span class="i">Cwd::getdcwd</span><span class="s">(</span><span class="s">)</span></code>
and introduce workaround for a misbehavior
seen on Strawberry Perl 5.20.1.</p>
<p>Fix <code class="inline"><a class="l_k" href="functions/chdir.html">chdir()</a></code> after building dependencies bug.</p>
<p>Introduce experimental support for plugins/hooks.</p>
<p>Integrate the <code class="inline"><span class="w">App::Cpan</span></code>
sources.</p>
<p>Do not check recursion on optional dependencies.</p>
<p>Sanity check <i>META.yml</i> to contain a hash.
<a href="http://search.cpan.org/perldoc/https:#%2frt.cpan.org%2fTicket%2fDisplay.html%3fid%3d95271">[cpan #95271]</a></p>
</li>
<li>
<p><a href="CPAN/Meta/Requirements.html">CPAN::Meta::Requirements</a> has been upgraded to version 2.132.</p>
<p>Works around limitations in <code class="inline"><span class="w">version::vpp</span></code>
detecting v-string magic and adds
support for forthcoming <a href="ExtUtils/MakeMaker.html">ExtUtils::MakeMaker</a> bootstrap <i>version.pm</i> for
Perls older than 5.10.0.</p>
</li>
<li>
<p><a href="Data/Dumper.html">Data::Dumper</a> has been upgraded to version 2.158.</p>
<p>Fixes CVE-2014-4330 by adding a configuration variable/option to limit
recursion when dumping deep data structures.</p>
<p>Changes to resolve Coverity issues.
XS dumps incorrectly stored the name of code references stored in a
GLOB.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122070">[perl #122070]</a></p>
</li>
<li>
<p><a href="DynaLoader.html">DynaLoader</a> has been upgraded to version 1.32.</p>
<p>Remove <code class="inline"><span class="w">dl_nonlazy</span></code>
global if unused in Dynaloader. [perl #122926]</p>
</li>
<li>
<p><a href="Encode.html">Encode</a> has been upgraded to version 2.72.</p>
<p><code class="inline"><span class="w">piconv</span></code>
now has better error handling when the encoding name is nonexistent,
and a build breakage when upgrading <a href="Encode.html">Encode</a> in perl-5.8.2 and earlier has
been fixed.</p>
<p>Building in C++ mode on Windows now works.</p>
</li>
<li>
<p><a href="Errno.html">Errno</a> has been upgraded to version 1.23.</p>
<p>Add <code class="inline">-<span class="w">P</span></code>
to the preprocessor command-line on GCC 5. GCC added extra
line directives, breaking parsing of error code definitions. [rt.perl.org
#123784]</p>
</li>
<li>
<p><a href="experimental.html">experimental</a> has been upgraded to version 0.013.</p>
<p>Hardcodes features for Perls older than 5.15.7.</p>
</li>
<li>
<p><a href="ExtUtils/CBuilder.html">ExtUtils::CBuilder</a> has been upgraded to version 0.280221.</p>
<p>Fixes a regression on Android.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122675">[perl #122675]</a></p>
</li>
<li>
<p><a href="ExtUtils/Manifest.html">ExtUtils::Manifest</a> has been upgraded to version 1.70.</p>
<p>Fixes a bug with <code class="inline"><span class="i">maniread</span><span class="s">(</span><span class="s">)</span></code>
's handling of quoted filenames and improves
<code class="inline"><span class="i">manifind</span><span class="s">(</span><span class="s">)</span></code>
to follow symlinks.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122415">[perl #122415]</a></p>
</li>
<li>
<p><a href="ExtUtils/ParseXS.html">ExtUtils::ParseXS</a> has been upgraded to version 3.28.</p>
<p>Only declare <code class="inline"><span class="w">file</span></code>
unused if we actually define it.
Improve generated <code class="inline"><span class="w">RETVAL</span></code>
code generation to avoid repeated
references to <code class="inline"><span class="i">ST</span><span class="s">(</span><span class="n">0</span><span class="s">)</span></code>
. [perl #123278]
Broaden and document the <code class="inline"><span class="q">/OBJ$/</span></code>
to <code class="inline"><span class="q">/REF$/</span></code>
typemap optimization
for the <code class="inline">DESTROY</code>
method. [perl #123418]</p>
</li>
<li>
<p><a href="Fcntl.html">Fcntl</a> has been upgraded to version 1.13.</p>
<p>Add support for the Linux pipe buffer size <code class="inline"><a class="l_k" href="functions/fcntl.html">fcntl()</a></code> commands.</p>
</li>
<li>
<p><a href="File/Find.html">File::Find</a> has been upgraded to version 1.29.</p>
<p><code class="inline"><span class="i">find</span><span class="s">(</span><span class="s">)</span></code>
and <code class="inline"><span class="i">finddepth</span><span class="s">(</span><span class="s">)</span></code>
will now warn if passed inappropriate or
misspelled options.</p>
</li>
<li>
<p><a href="File/Glob.html">File::Glob</a> has been upgraded to version 1.24.</p>
<p>Avoid <code class="inline"><span class="i">SvIV</span><span class="s">(</span><span class="s">)</span></code>
expanding to call <code class="inline"><span class="i">get_sv</span><span class="s">(</span><span class="s">)</span></code>
three times in a few
places. [perl #123606]</p>
</li>
<li>
<p><a href="HTTP/Tiny.html">HTTP::Tiny</a> has been upgraded to version 0.054.</p>
<p><code class="inline"><span class="w">keep_alive</span></code>
is now fork-safe and thread-safe.</p>
</li>
<li>
<p><a href="IO.html">IO</a> has been upgraded to version 1.35.</p>
<p>The XS implementation has been fixed for the sake of older Perls.</p>
</li>
<li>
<p><a href="IO/Socket.html">IO::Socket</a> has been upgraded to version 1.38.</p>
<p>Document the limitations of the <code class="inline"><span class="i">connected</span><span class="s">(</span><span class="s">)</span></code>
method. [perl #123096]</p>
</li>
<li>
<p><a href="IO/Socket/IP.html">IO::Socket::IP</a> has been upgraded to version 0.37.</p>
<p>A better fix for subclassing <code class="inline"><a class="l_k" href="functions/connect.html">connect()</a></code>.
<a href="http://search.cpan.org/perldoc/https:#%2frt.cpan.org%2fTicket%2fDisplay.html%3fid%3d95983">[cpan #95983]</a>
<a href="http://search.cpan.org/perldoc/https:#%2frt.cpan.org%2fTicket%2fDisplay.html%3fid%3d97050">[cpan #97050]</a></p>
<p>Implements Timeout for <code class="inline"><a class="l_k" href="functions/connect.html">connect()</a></code>.
<a href="http://search.cpan.org/perldoc/https:#%2frt.cpan.org%2fTicket%2fDisplay.html%3fid%3d92075">[cpan #92075]</a></p>
</li>
<li>
<p>The libnet collection of modules has been upgraded to version 3.05.</p>
<p>Support for IPv6 and SSL to <code class="inline"><span class="w">Net::FTP</span></code>
, <code class="inline"><span class="w">Net::NNTP</span></code>
, <code class="inline"><span class="w">Net::POP3</span></code>
and <code class="inline"><span class="w">Net::SMTP</span></code>
.
Improvements in <code class="inline"><span class="w">Net::SMTP</span></code>
authentication.</p>
</li>
<li>
<p><a href="Locale/Codes.html">Locale::Codes</a> has been upgraded to version 3.34.</p>
<p>Fixed a bug in the scripts used to extract data from spreadsheets that
prevented the SHP currency code from being found.
<a href="http://search.cpan.org/perldoc/https:#%2frt.cpan.org%2fTicket%2fDisplay.html%3fid%3d94229">[cpan #94229]</a></p>
<p>New codes have been added.</p>
</li>
<li>
<p><a href="Math/BigInt.html">Math::BigInt</a> has been upgraded to version 1.9997.</p>
<p>Synchronize POD changes from the CPAN release.
<code class="inline"><span class="w">Math::BigFloat</span><span class="w">->blog</span><span class="s">(</span><span class="w">x</span><span class="s">)</span></code>
would sometimes return <code class="inline"><span class="i">blog</span><span class="s">(</span><span class="n">2</span>*<span class="w">x</span><span class="s">)</span></code>
when
the accuracy was greater than 70 digits.
The result of <code class="inline"><span class="w">Math::BigFloat</span><span class="w">->bdiv</span><span class="s">(</span><span class="s">)</span></code>
in list context now
satisfies <code class="inline"><span class="w">x</span> = <span class="w">quotient</span> * <span class="w">divisor</span> + <span class="w">remainder</span></code>
.</p>
<p>Correct handling of subclasses.
<a href="http://search.cpan.org/perldoc/https:#%2frt.cpan.org%2fTicket%2fDisplay.html%3fid%3d96254">[cpan #96254]</a>
<a href="http://search.cpan.org/perldoc/https:#%2frt.cpan.org%2fTicket%2fDisplay.html%3fid%3d96329">[cpan #96329]</a></p>
</li>
<li>
<p><a href="Module/Metadata.html">Module::Metadata</a> has been upgraded to version 1.000026.</p>
<p>Support installations on older perls with an <a href="ExtUtils/MakeMaker.html">ExtUtils::MakeMaker</a> earlier
than 6.63_03</p>
</li>
<li>
<p><a href="overload.html">overload</a> has been upgraded to version 1.26.</p>
<p>A redundant <code class="inline"><a class="l_k" href="functions/ref.html">ref</a> <span class="i">$sub</span></code>
check has been removed.</p>
</li>
<li>
<p>The PathTools module collection has been upgraded to version 3.56.</p>
<p>A warning from the <b>gcc</b> compiler is now avoided when building the XS.</p>
<p>Don't turn leading <code class="inline"><span class="q">//</span></code>
into <code class="inline">/</code> on Cygwin. [perl #122635]</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/perl5db.pl">perl5db.pl</a> has been upgraded to version 1.49.</p>
<p>The debugger would cause an assertion failure.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d124127">[perl #124127]</a></p>
<p><code class="inline"><a class="l_k" href="functions/fork.html">fork()</a></code> in the debugger under <code class="inline"><span class="w">tmux</span></code>
will now create a new window for
the forked process. <a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121333">[perl #121333]</a></p>
<p>The debugger now saves the current working directory on startup and
restores it when you restart your program with <code class="inline"><span class="w">R</span></code>
or <code class="inline"><span class="w">rerun</span></code>
. <a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121509">[perl #121509]</a></p>
</li>
<li>
<p><a href="PerlIO/scalar.html">PerlIO::scalar</a> has been upgraded to version 0.22.</p>
<p>Reading from a position well past the end of the scalar now correctly
returns end of file. [perl #123443]</p>
<p>Seeking to a negative position still fails, but no longer leaves the
file position set to a negation location.</p>
<p><code class="inline"><a class="l_k" href="functions/eof.html">eof()</a></code> on a <code class="inline"><span class="w">PerlIO::scalar</span></code>
handle now properly returns true when
the file position is past the 2GB mark on 32-bit systems.</p>
<p>Attempting to write at file positions impossible for the platform now
fail early rather than wrapping at 4GB.</p>
</li>
<li>
<p><a href="Pod/Perldoc.html">Pod::Perldoc</a> has been upgraded to version 3.25.</p>
<p>Filehandles opened for reading or writing now have <code class="inline"><span class="j">:</span><span class="i">encoding</span><span class="s">(</span><span class="w">UTF</span>-<span class="n">8</span><span class="s">)</span></code>
set.
<a href="http://search.cpan.org/perldoc/https:#%2frt.cpan.org%2fTicket%2fDisplay.html%3fid%3d98019">[cpan #98019]</a></p>
</li>
<li>
<p><a href="POSIX.html">POSIX</a> has been upgraded to version 1.53.</p>
<p>The C99 math functions and constants (for example <code class="inline"><span class="w">acosh</span></code>
, <code class="inline"><span class="w">isinf</span></code>
, <code class="inline"><span class="w">isnan</span></code>
, <code class="inline"><span class="w">round</span></code>
,
<code class="inline"><span class="w">trunc</span></code>
; <code class="inline"><span class="w">M_E</span></code>
, <code class="inline"><span class="w">M_SQRT2</span></code>
, <code class="inline"><span class="w">M_PI</span></code>
) have been added.</p>
<p><code class="inline"><span class="i">POSIX::tmpnam</span><span class="s">(</span><span class="s">)</span></code>
now produces a deprecation warning. [perl #122005]</p>
</li>
<li>
<p><a href="Safe.html">Safe</a> has been upgraded to version 2.39.</p>
<p><code class="inline"><span class="w">reval</span></code>
was not propagating void context properly.</p>
</li>
<li>
<p>Scalar-List-Utils has been upgraded to version 1.41.</p>
<p>A new module, <a href="Sub/Util.html">Sub::Util</a>, has been added, containing functions related to
CODE refs, including <code class="inline"><span class="w">subname</span></code>
(inspired by <code class="inline"><span class="w">Sub::Identity</span></code>
) and <code class="inline"><span class="w">set_subname</span></code>
(copied and renamed from <code class="inline"><span class="w">Sub::Name</span></code>
).
The use of <code class="inline"><span class="w">GetMagic</span></code>
in <code class="inline"><span class="i">List::Util::reduce</span><span class="s">(</span><span class="s">)</span></code>
has also been fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.cpan.org%2fTicket%2fDisplay.html%3fid%3d63211">[cpan #63211]</a></p>
</li>
<li>
<p><a href="SDBM_File.html">SDBM_File</a> has been upgraded to version 1.13.</p>
<p>Simplified the build process. [perl #123413]</p>
</li>
<li>
<p><a href="Time/Piece.html">Time::Piece</a> has been upgraded to version 1.29.</p>
<p>When pretty printing negative <code class="inline"><span class="w">Time::Seconds</span></code>
, the "minus" is no longer lost.</p>
</li>
<li>
<p><a href="Unicode/Collate.html">Unicode::Collate</a> has been upgraded to version 1.12.</p>
<p>Version 0.67's improved discontiguous contractions is invalidated by default
and is supported as a parameter <code class="inline"><span class="w">long_contraction</span></code>
.</p>
</li>
<li>
<p><a href="Unicode/Normalize.html">Unicode::Normalize</a> has been upgraded to version 1.18.</p>
<p>The XSUB implementation has been removed in favor of pure Perl.</p>
</li>
<li>
<p><a href="Unicode/UCD.html">Unicode::UCD</a> has been upgraded to version 0.61.</p>
<p>A new function <a href="Unicode/UCD.html#prop_values()">property_values()</a>
has been added to return a given property's possible values.</p>
<p>A new function <a href="Unicode/UCD.html#charprop()">charprop()</a>
has been added to return the value of a given property for a given code
point.</p>
<p>A new function <a href="Unicode/UCD.html#charprops_all()">charprops_all()</a>
has been added to return the values of all Unicode properties for a
given code point.</p>
<p>A bug has been fixed so that <a href="Unicode/UCD.html#prop_aliases()">propaliases()</a>
returns the correct short and long names for the Perl extensions where
it was incorrect.</p>
<p>A bug has been fixed so that
<a href="Unicode/UCD.html#prop_value_aliases()">prop_value_aliases()</a>
returns <code class="inline"><a class="l_k" href="functions/undef.html">undef</a></code> instead of a wrong result for properties that are Perl
extensions.</p>
<p>This module now works on EBCDIC platforms.</p>
</li>
<li>
<p><a href="utf8.html">utf8</a> has been upgraded to version 1.17</p>
<p>A mismatch between the documentation and the code in <code class="inline"><span class="i">utf8::downgrade</span><span class="s">(</span><span class="s">)</span></code>
was fixed in favor of the documentation. The optional second argument
is now correctly treated as a perl boolean (true/false semantics) and
not as an integer.</p>
</li>
<li>
<p><a href="version.html">version</a> has been upgraded to version 0.9909.</p>
<p>Numerous changes. See the <i>Changes</i> file in the CPAN distribution for
details.</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/Win32">Win32</a> has been upgraded to version 0.51.</p>
<p><code class="inline"><span class="i">GetOSName</span><span class="s">(</span><span class="s">)</span></code>
now supports Windows 8.1, and building in C++ mode now works.</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/Win32API::File">Win32API::File</a> has been upgraded to version 0.1202</p>
<p>Building in C++ mode now works.</p>
</li>
<li>
<p><a href="XSLoader.html">XSLoader</a> has been upgraded to version 0.20.</p>
<p>Allow XSLoader to load modules from a different namespace.
[perl #122455]</p>
</li>
</ul>
<a name="Removed-Modules-and-Pragmata"></a><h2>Removed Modules and Pragmata</h2>
<p>The following modules (and associated modules) have been removed from the core
perl distribution:</p>
<ul>
<li>
<p><a href="http://search.cpan.org/perldoc/CGI">CGI</a></p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/Module::Build">Module::Build</a></p>
</li>
</ul>
<a name="Documentation"></a><h1>Documentation</h1>
<a name="New-Documentation"></a><h2>New Documentation</h2>
<a name="the-perlunicook-manpage"></a><h3><a href="perlunicook.html">perlunicook</a></h3>
<p>This document, by Tom Christiansen, provides examples of handling Unicode in
Perl.</p>
<a name="Changes-to-Existing-Documentation"></a><h2>Changes to Existing Documentation</h2>
<a name="the-perlaix-manpage"></a><h3><a href="perlaix.html">perlaix</a></h3>
<ul>
<li>
<p>A note on long doubles has been added.</p>
</li>
</ul>
<a name="the-perlapi-manpage"></a><h3><a href="perlapi.html">perlapi</a></h3>
<ul>
<li>
<p>Note that <code class="inline"><span class="w">SvSetSV</span></code>
doesn't do set magic.</p>
</li>
<li>
<p><code class="inline"><span class="w">sv_usepvn_flags</span></code>
- fix documentation to mention the use of <code class="inline"><span class="w">Newx</span></code>
instead of
<code class="inline"><span class="w">malloc</span></code>
.</p>
<p><a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121869">[perl #121869]</a></p>
</li>
<li>
<p>Clarify where <code class="inline"><span class="w">NUL</span></code>
may be embedded or is required to terminate a string.</p>
</li>
<li>
<p>Some documentation that was previously missing due to formatting errors is
now included.</p>
</li>
<li>
<p>Entries are now organized into groups rather than by the file where they
are found.</p>
</li>
<li>
<p>Alphabetical sorting of entries is now done consistently (automatically
by the POD generator) to make entries easier to find when scanning.</p>
</li>
</ul>
<a name="the-perldata-manpage"></a><h3><a href="perldata.html">perldata</a></h3>
<ul>
<li>
<p>The syntax of single-character variable names has been brought
up-to-date and more fully explained.</p>
</li>
<li>
<p>Hexadecimal floating point numbers are described, as are infinity and
NaN.</p>
</li>
</ul>
<a name="the-perlebcdic-manpage"></a><h3><a href="perlebcdic.html">perlebcdic</a></h3>
<ul>
<li>
<p>This document has been significantly updated in the light of recent
improvements to EBCDIC support.</p>
</li>
</ul>
<a name="the-perlfilter-manpage"></a><h3><a href="perlfilter.html">perlfilter</a></h3>
<ul>
<li>
<p>Added a <a href="perlfilter.html#LIMITATIONS">LIMITATIONS</a> section.</p>
</li>
</ul>
<a name="the-perlfunc-manpage"></a><h3><a href="perlfunc.html">perlfunc</a></h3>
<ul>
<li>
<p>Mention that <code class="inline"><a class="l_k" href="functions/study.html">study()</a></code> is currently a no-op.</p>
</li>
<li>
<p>Calling <code class="inline"><a class="l_k" href="functions/delete.html">delete</a></code> or <code class="inline"><a class="l_k" href="functions/exists.html">exists</a></code> on array values is now described as "strongly
discouraged" rather than "deprecated".</p>
</li>
<li>
<p>Improve documentation of <code class="inline"><a class="l_k" href="functions/our.html">our</a></code>.</p>
</li>
<li>
<p><code class="inline">-l</code>
now notes that it will return false if symlinks aren't supported by the
file system.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121523">[perl #121523]</a></p>
</li>
<li>
<p>Note that <code class="inline"><a class="l_k" href="functions/exec.html">exec</a> <span class="i">LIST</span></code>
and <code class="inline"><a class="l_k" href="functions/system.html">system</a> <span class="i">LIST</span></code>
may fall back to the shell on
Win32. Only the indirect-object syntax <code class="inline"><a class="l_k" href="functions/exec.html">exec</a> <span class="i">PROGRAM</span> <span class="w">LIST</span></code>
and
<code class="inline"><a class="l_k" href="functions/system.html">system</a> <span class="i">PROGRAM</span> <span class="w">LIST</span></code>
will reliably avoid using the shell.</p>
<p>This has also been noted in <a href="perlport.html">perlport</a>.</p>
<p><a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122046">[perl #122046]</a></p>
</li>
</ul>
<a name="the-perlguts-manpage"></a><h3><a href="perlguts.html">perlguts</a></h3>
<ul>
<li>
<p>The OOK example has been updated to account for COW changes and a change in the
storage of the offset.</p>
</li>
<li>
<p>Details on C level symbols and libperl.t added.</p>
</li>
<li>
<p>Information on Unicode handling has been added</p>
</li>
<li>
<p>Information on EBCDIC handling has been added</p>
</li>
</ul>
<a name="the-perlhack-manpage"></a><h3><a href="perlhack.html">perlhack</a></h3>
<ul>
<li>
<p>A note has been added about running on platforms with non-ASCII
character sets</p>
</li>
<li>
<p>A note has been added about performance testing</p>
</li>
</ul>
<a name="the-perlhacktips-manpage"></a><h3><a href="perlhacktips.html">perlhacktips</a></h3>
<ul>
<li>
<p>Documentation has been added illustrating the perils of assuming that
there is no change to the contents of static memory pointed to by the
return values of Perl's wrappers for C library functions.</p>
</li>
<li>
<p>Replacements for <code class="inline"><span class="w">tmpfile</span></code>
, <code class="inline"><span class="w">atoi</span></code>
, <code class="inline"><span class="w">strtol</span></code>
, and <code class="inline"><span class="w">strtoul</span></code>
are now
recommended.</p>
</li>
<li>
<p>Updated documentation for the <code class="inline"><span class="w">test</span>.<span class="w">valgrind</span></code>
<code class="inline"><span class="w">make</span></code>
target.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121431">[perl #121431]</a></p>
</li>
<li>
<p>Information is given about writing test files portably to non-ASCII
platforms.</p>
</li>
<li>
<p>A note has been added about how to get a C language stack backtrace.</p>
</li>
</ul>
<a name="the-perlhpux-manpage"></a><h3><a href="perlhpux.html">perlhpux</a></h3>
<ul>
<li>
<p>Note that the message "Redeclaration of "sendpath" with a different
storage class specifier" is harmless.</p>
</li>
</ul>
<a name="the-perllocale-manpage"></a><h3><a href="perllocale.html">perllocale</a></h3>
<ul>
<li>
<p>Updated for the enhancements in v5.22, along with some clarifications.</p>
</li>
</ul>
<a name="the-perlmodstyle-manpage"></a><h3><a href="perlmodstyle.html">perlmodstyle</a></h3>
<ul>
<li>
<p>Instead of pointing to the module list, we are now pointing to
<a href="http://search.cpan.org/perldoc/http:#%2fprepan.org%2f">PrePAN</a>.</p>
</li>
</ul>
<a name="the-perlop-manpage"></a><h3><a href="perlop.html">perlop</a></h3>
<ul>
<li>
<p>Updated for the enhancements in v5.22, along with some clarifications.</p>
</li>
</ul>
<a name="the-perlpodspec-manpage"></a><h3><a href="perlpodspec.html">perlpodspec</a></h3>
<ul>
<li>
<p>The specification of the pod language is changing so that the default
encoding of pods that aren't in UTF-8 (unless otherwise indicated) is
CP1252 instead of ISO 8859-1 (Latin1).</p>
</li>
</ul>
<a name="the-perlpolicy-manpage"></a><h3><a href="perlpolicy.html">perlpolicy</a></h3>
<ul>
<li>
<p>We now have a code of conduct for the <i>p5p</i> mailing list, as documented
in <a href="perlpolicy.html#STANDARDS-OF-CONDUCT">STANDARDS OF CONDUCT in perlpolicy</a>.</p>
</li>
<li>
<p>The conditions for marking an experimental feature as non-experimental are now
set out.</p>
</li>
<li>
<p>Clarification has been made as to what sorts of changes are permissible in
maintenance releases.</p>
</li>
</ul>
<a name="the-perlport-manpage"></a><h3><a href="perlport.html">perlport</a></h3>
<ul>
<li>
<p>Out-of-date VMS-specific information has been fixed and/or simplified.</p>
</li>
<li>
<p>Notes about EBCDIC have been added.</p>
</li>
</ul>
<a name="the-perlre-manpage"></a><h3><a href="perlre.html">perlre</a></h3>
<ul>
<li>
<p>The description of the <code class="inline">/x</code> modifier has been clarified to note that
comments cannot be continued onto the next line by escaping them; and
there is now a list of all the characters that are considered whitespace
by this modifier.</p>
</li>
<li>
<p>The new <code class="inline"><span class="q">/n</span></code>
modifier is described.</p>
</li>
<li>
<p>A note has been added on how to make bracketed character class ranges
portable to non-ASCII machines.</p>
</li>
</ul>
<a name="the-perlrebackslash-manpage"></a><h3><a href="perlrebackslash.html">perlrebackslash</a></h3>
<ul>
<li>
<p>Added documentation of <code class="inline">\<span class="i">b</span><span class="s">{</span><span class="w">sb</span><span class="s">}</span></code>
, <code class="inline">\<span class="i">b</span><span class="s">{</span><span class="w">wb</span><span class="s">}</span></code>
, <code class="inline">\<span class="i">b</span><span class="s">{</span><span class="w">gcb</span><span class="s">}</span></code>
, and <code class="inline">\<span class="i">b</span><span class="s">{</span><span class="w">g</span><span class="s">}</span></code>
.</p>
</li>
</ul>
<a name="the-perlrecharclass-manpage"></a><h3><a href="perlrecharclass.html">perlrecharclass</a></h3>
<ul>
<li>
<p>Clarifications have been added to <a href="perlrecharclass.html#Character-Ranges">Character Ranges in perlrecharclass</a>
to the effect <code class="inline"><span class="s">[</span><span class="w">A</span>-<span class="w">Z</span><span class="s">]</span></code>
, <code class="inline"><span class="s">[</span><span class="w">a</span>-z<span class="s">]</span></code>
, <code class="inline"><span class="s">[</span><span class="n">0</span>-<span class="n">9</span><span class="s">]</span></code>
and
any subranges thereof in regular expression bracketed character classes
are guaranteed to match exactly what a naive English speaker would
expect them to match, even on platforms (such as EBCDIC) where perl
has to do extra work to accomplish this.</p>
</li>
<li>
<p>The documentation of Bracketed Character Classes has been expanded to cover the
improvements in <code class="inline"><span class="q">qr/[\N{named sequence}]/</span></code>
(see under <a href="#Selected-Bug-Fixes">Selected Bug Fixes</a>).</p>
</li>
</ul>
<a name="the-perlref-manpage"></a><h3><a href="perlref.html">perlref</a></h3>
<ul>
<li>
<p>A new section has been added
<a href="perlref.html#Assigning-to-References">Assigning to References</a></p>
</li>
</ul>
<a name="the-perlsec-manpage"></a><h3><a href="perlsec.html">perlsec</a></h3>
<ul>
<li>
<p>Comments added on algorithmic complexity and tied hashes.</p>
</li>
</ul>
<a name="the-perlsyn-manpage"></a><h3><a href="perlsyn.html">perlsyn</a></h3>
<ul>
<li>
<p>An ambiguity in the documentation of the <code class="inline">...</code>
statement has been corrected.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122661">[perl #122661]</a></p>
</li>
<li>
<p>The empty conditional in <code class="inline">for</code>
and <code class="inline">while</code>
is now documented
in <a href="perlsyn.html">perlsyn</a>.</p>
</li>
</ul>
<a name="the-perlunicode-manpage"></a><h3><a href="perlunicode.html">perlunicode</a></h3>
<ul>
<li>
<p>This has had extensive revisions to bring it up-to-date with current
Unicode support and to make it more readable. Notable is that Unicode
7.0 changed what it should do with non-characters. Perl retains the old
way of handling for reasons of backward compatibility. See
<a href="perlunicode.html#Noncharacter-code-points">Noncharacter code points in perlunicode</a>.</p>
</li>
</ul>
<a name="the-perluniintro-manpage"></a><h3><a href="perluniintro.html">perluniintro</a></h3>
<ul>
<li>
<p>Advice for how to make sure your strings and regular expression patterns are
interpreted as Unicode has been updated.</p>
</li>
</ul>
<a name="the-perlvar-manpage"></a><h3><a href="perlvar.html">perlvar</a></h3>
<ul>
<li>
<p><code class="inline"><span class="i">$]</span></code>
is no longer listed as being deprecated. Instead, discussion has
been added on the advantages and disadvantages of using it versus
<code class="inline"><span class="i">$^V</span></code>
.</p>
</li>
<li>
<p><code class="inline"><span class="i">$</span>{<span class="w">^ENCODING</span>}</code>
is now marked as deprecated.</p>
</li>
<li>
<p>The entry for <code class="inline"><span class="i">%^H</span></code>
has been clarified to indicate it can only handle
simple values.</p>
</li>
</ul>
<a name="the-perlvms-manpage"></a><h3><a href="perlvms.html">perlvms</a></h3>
<ul>
<li>
<p>Out-of-date and/or incorrect material has been removed.</p>
</li>
<li>
<p>Updated documentation on environment and shell interaction in VMS.</p>
</li>
</ul>
<a name="the-perlxs-manpage"></a><h3><a href="perlxs.html">perlxs</a></h3>
<ul>
<li>
<p>Added a discussion of locale issues in XS code.</p>
</li>
</ul>
<a name="Diagnostics"></a><h1>Diagnostics</h1>
<p>The following additions or changes have been made to diagnostic output,
including warnings and fatal error messages. For the complete list of
diagnostic messages, see <a href="perldiag.html">perldiag</a>.</p>
<a name="New-Diagnostics"></a><h2>New Diagnostics</h2>
<a name="New-Errors"></a><h3>New Errors</h3>
<ul>
<li>
<p><a href="perldiag.html#Bad-symbol-for-scalar">Bad symbol for scalar</a></p>
<p>(P) An internal request asked to add a scalar entry to something that
wasn't a symbol table entry.</p>
</li>
<li>
<p><a href="perldiag.html#Can't-use-a-hash-as-a-reference">Can't use a hash as a reference</a></p>
<p>(F) You tried to use a hash as a reference, as in
<code class="inline"><span class="i">%foo</span>->{<span class="q">"bar"</span>}</code>
or <code class="inline"><span class="i">%$ref</span>->{<span class="q">"hello"</span>}</code>
. Versions of perl <= 5.6.1
used to allow this syntax, but shouldn't have.</p>
</li>
<li>
<p><a href="perldiag.html#Can't-use-an-array-as-a-reference">Can't use an array as a reference</a></p>
<p>(F) You tried to use an array as a reference, as in
<code class="inline"><span class="i">@foo</span>->[<span class="n">23</span>]</code>
or <code class="inline"><span class="i">@$ref</span>->[<span class="n">99</span>]</code>
. Versions of perl <= 5.6.1 used to
allow this syntax, but shouldn't have.</p>
</li>
<li>
<p><a href="perldiag.html#Can't-use-'defined(%40array)'-(Maybe-you-should-just-omit-the-defined()%3f)">Can't use 'defined(@array)' (Maybe you should just omit the defined()?)</a></p>
<p>(F) <code class="inline"><a class="l_k" href="functions/defined.html">defined()</a></code> is not useful on arrays because it
checks for an undefined <i>scalar</i> value. If you want to see if the
array is empty, just use <code class="inline">if (@array) { # not empty }</code> for example.</p>
</li>
<li>
<p><a href="perldiag.html#Can't-use-'defined(%25hash)'-(Maybe-you-should-just-omit-the-defined()%3f)">Can't use 'defined(%hash)' (Maybe you should just omit the defined()?)</a></p>
<p>(F) <code class="inline"><a class="l_k" href="functions/defined.html">defined()</a></code> is not usually right on hashes.</p>
<p>Although <code class="inline"><a class="l_k" href="functions/defined.html">defined</a> <span class="i">%hash</span></code>
is false on a plain not-yet-used hash, it
becomes true in several non-obvious circumstances, including iterators,
weak references, stash names, even remaining true after <code class="inline"><a class="l_k" href="functions/undef.html">undef</a> <span class="i">%hash</span></code>
.
These things make <code class="inline"><a class="l_k" href="functions/defined.html">defined</a> <span class="i">%hash</span></code>
fairly useless in practice, so it now
generates a fatal error.</p>
<p>If a check for non-empty is what you wanted then just put it in boolean
context (see <a href="perldata.html#Scalar-values">Scalar values in perldata</a>):</p>
<pre class="verbatim"><ol><li> <a class="l_k" href="functions/if.html">if</a> <span class="s">(</span><span class="i">%hash</span><span class="s">)</span> <span class="s">{</span></li><li> <span class="c"># not empty</span></li><li> <span class="s">}</span></li></ol></pre><p>If you had <code class="inline"><a class="l_k" href="functions/defined.html">defined</a> <span class="i">%Foo::Bar::QUUX</span></code>
to check whether such a package
variable exists then that's never really been reliable, and isn't
a good way to enquire about the features of a package, or whether
it's loaded, etc.</p>
</li>
<li>
<p><a href="perldiag.html#Cannot-chr-%25f">Cannot chr %f</a></p>
<p>(F) You passed an invalid number (like an infinity or not-a-number) to
<code class="inline"><a class="l_k" href="functions/chr.html">chr</a></code>.</p>
</li>
<li>
<p><a href="perldiag.html#Cannot-compress-%25f-in-pack">Cannot compress %f in pack</a></p>
<p>(F) You tried converting an infinity or not-a-number to an unsigned
character, which makes no sense.</p>
</li>
<li>
<p><a href="perldiag.html#Cannot-pack-%25f-with-'%25c'">Cannot pack %f with '%c'</a></p>
<p>(F) You tried converting an infinity or not-a-number to a character,
which makes no sense.</p>
</li>
<li>
<p><a href="perldiag.html#Cannot-printf-%25f-with-'%25c'">Cannot print %f with '%c'</a></p>
<p>(F) You tried printing an infinity or not-a-number as a character (<code class="inline"><span class="i">%c</span></code>
),
which makes no sense. Maybe you meant <code class="inline"><span class="q">'%s'</span></code>
, or just stringifying it?</p>
</li>
<li>
<p><a href="perldiag.html#charnames-alias-definitions-may-not-contain-a-sequence-of-multiple-spaces">charnames alias definitions may not contain a sequence of multiple spaces</a></p>
<p>(F) You defined a character name which had multiple space
characters in a row. Change them to single spaces. Usually these
names are defined in the <code class="inline"><span class="j">:</span><span class="w">alias</span></code>
import argument to <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">charnames</span></code>
, but
they could be defined by a translator installed into <code class="inline"><span class="i">$^H</span>{<span class="w">charnames</span>}</code>
.
See <a href="charnames.html#CUSTOM-ALIASES">CUSTOM ALIASES in charnames</a>.</p>
</li>
<li>
<p><a href="perldiag.html#charnames-alias-definitions-may-not-contain-trailing-white-space">charnames alias definitions may not contain trailing white-space</a></p>
<p>(F) You defined a character name which ended in a space
character. Remove the trailing space(s). Usually these names are
defined in the <code class="inline"><span class="j">:</span><span class="w">alias</span></code>
import argument to <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">charnames</span></code>
, but they
could be defined by a translator installed into <code class="inline"><span class="i">$^H</span>{<span class="w">charnames</span>}</code>
.
See <a href="charnames.html#CUSTOM-ALIASES">CUSTOM ALIASES in charnames</a>.</p>
</li>
<li>
<p><a href="perldiag.html#%3aconst-is-not-permitted-on-named-subroutines">:const is not permitted on named subroutines</a></p>
<p>(F) The <code class="inline"><span class="w">const</span></code>
attribute causes an anonymous subroutine to be run and
its value captured at the time that it is cloned. Named subroutines are
not cloned like this, so the attribute does not make sense on them.</p>
</li>
<li>
<p><a href="perldiag.html#Hexadecimal-float%3a-internal-error">Hexadecimal float: internal error</a></p>
<p>(F) Something went horribly bad in hexadecimal float handling.</p>
</li>
<li>
<p><a href="perldiag.html#Hexadecimal-float%3a-unsupported-long-double-format">Hexadecimal float: unsupported long double format</a></p>
<p>(F) You have configured Perl to use long doubles but
the internals of the long double format are unknown,
therefore the hexadecimal float output is impossible.</p>
</li>
<li>
<p><a href="perldiag.html#Illegal-suidscript">Illegal suidscript</a></p>
<p>(F) The script run under suidperl was somehow illegal.</p>
</li>
<li>
<p><a href="perldiag.html#In-'(%3f...)'%2c-the-'('-and-'%3f'-must-be-adjacent-in-regex%3b-marked-by-%3c---HERE-in-m%2f%25s%2f">In '(?...)', the '(' and '?' must be adjacent in regex; marked by <-- HERE in m/%s/</a></p>
<p>(F) The two-character sequence <code class="inline"><span class="q">"(?"</span></code>
in
this context in a regular expression pattern should be an
indivisible token, with nothing intervening between the <code class="inline"><span class="q">"("</span></code>
and the <code class="inline"><span class="q">"?"</span></code>
, but you separated them.</p>
</li>
<li>
<p><a href="perldiag.html#In-'(*VERB...)'%2c-the-'('-and-'*'-must-be-adjacent-in-regex%3b-marked-by-%3c---HERE-in-m%2f%25s%2f">In '(*VERB...)', the '(' and '*' must be adjacent in regex; marked by <-- HERE in m/%s/</a></p>
<p>(F) The two-character sequence <code class="inline"><span class="q">"(*"</span></code>
in
this context in a regular expression pattern should be an
indivisible token, with nothing intervening between the <code class="inline"><span class="q">"("</span></code>
and the <code class="inline"><span class="q">"*"</span></code>
, but you separated them.</p>
</li>
<li>
<p><a href="perldiag.html#Invalid-quantifier-in-%7b%2c%7d-in-regex%3b-marked-by-%3c---HERE-in-m%2f%25s%2f">Invalid quantifier in {,} in regex; marked by <-- HERE in m/%s/</a></p>
<p>(F) The pattern looks like a {min,max} quantifier, but the min or max could not
be parsed as a valid number: either it has leading zeroes, or it represents
too big a number to cope with. The <-- HERE shows where in the regular
expression the problem was discovered. See <a href="perlre.html">perlre</a>.</p>
</li>
<li>
<p><a href="perldiag.html#'%25s'-is-an-unknown-bound-type-in-regex%3b-marked-by-%3c---HERE-in-m%2f%25s%2f">'%s' is an unknown bound type in regex</a></p>
<p>(F) You used <code class="inline">\<span class="i">b</span><span class="s">{</span>...<span class="s">}</span></code>
or <code class="inline">\<span class="i">B</span><span class="s">{</span>...<span class="s">}</span></code>
and the <code class="inline">...</code>
is not known to
Perl. The current valid ones are given in
<a href="perlrebackslash.html#%5cb%7b%7d%2c-%5cb%2c-%5cB%7b%7d%2c-%5cB">\b{}, \b, \B{}, \B in perlrebackslash</a>.</p>
</li>
<li>
<p><a href="perldiag.html#Missing-or-undefined-argument-to-require">Missing or undefined argument to require</a></p>
<p>(F) You tried to call <code class="inline"><a class="l_k" href="functions/require.html">require</a></code> with no argument or with an undefined
value as an argument. <code class="inline"><a class="l_k" href="functions/require.html">require</a></code> expects either a package name or a
file-specification as an argument. See <a href="functions/require.html">require</a>.</p>
<p>Formerly, <code class="inline"><a class="l_k" href="functions/require.html">require</a></code> with no argument or <code class="inline"><a class="l_k" href="functions/undef.html">undef</a></code> warned about a Null filename.</p>
</li>
</ul>
<a name="New-Warnings"></a><h3>New Warnings</h3>
<ul>
<li>
<p><a href="perldiag.html#%5cC-is-deprecated-in-regex%3b-marked-by-%3c---HERE-in-m%2f%25s%2f">\C is deprecated in regex</a></p>
<p>(D deprecated) The <code class="inline"><span class="q">/\C/</span></code>
character class was deprecated in v5.20, and
now emits a warning. It is intended that it will become an error in v5.24.
This character class matches a single byte even if it appears within a
multi-byte character, breaks encapsulation, and can corrupt UTF-8
strings.</p>
</li>
<li>
<p><a href="perldiag.html#%22%25s%22-is-more-clearly-written-simply-as-%22%25s%22-in-regex%3b-marked-by-%3c---HERE-in-m%2f%25s%2f">%s is more clearly written simply as %s in regex; marked by <-- HERE in m/%s/</a></p>
<p>(W regexp) (only under <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">re</span> <span class="q">'strict'</span></code>
or within <code class="inline"><span class="s">(</span><span class="q">?[...])</span></code>
)</p>
<p>You specified a character that has the given plainer way of writing it,
and which is also portable to platforms running with different character
sets.</p>
</li>
<li>
<p><a href="perldiag.html#Argument-%22%25s%22-treated-as-0-in-increment-(%2b%2b)">Argument %s treated as 0 in increment (++)</a></p>
<p>(W numeric) The indicated string was fed as an argument to the <code class="inline">++</code>
operator
which expects either a number or a string matching <code class="inline"><span class="q">/^[a-zA-Z]*[0-9]*\z/</span></code>
.
See <a href="perlop.html#Auto-increment-and-Auto-decrement">Auto-increment and Auto-decrement in perlop</a> for details.</p>
</li>
<li>
<p><a href="perldiag.html#Both-or-neither-range-ends-should-be-Unicode-in-regex%3b-marked-by-%3c---HERE-in-m%2f%25s%2f">Both or neither range ends should be Unicode in regex; marked by <-- HERE in m/%s/</a></p>
<p>(W regexp) (only under <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">re</span> <span class="q">'strict'</span></code>
or within <code class="inline"><span class="s">(</span><span class="q">?[...])</span></code>
)</p>
<p>In a bracketed character class in a regular expression pattern, you
had a range which has exactly one end of it specified using <code class="inline">\<span class="w">N</span><span class="s">{</span><span class="s">}</span></code>
, and
the other end is specified using a non-portable mechanism. Perl treats
the range as a Unicode range, that is, all the characters in it are
considered to be the Unicode characters, and which may be different code
points on some platforms Perl runs on. For example, <code class="inline"><span class="s">[</span>\<span class="i">N</span><span class="s">{</span><span class="w">U</span>+<span class="n">06</span><span class="s">}</span>-\<span class="w">x08</span><span class="s">]</span></code>
is treated as if you had instead said <code class="inline"><span class="s">[</span>\<span class="i">N</span><span class="s">{</span><span class="w">U</span>+<span class="n">06</span><span class="s">}</span>-\<span class="i">N</span><span class="s">{</span><span class="w">U</span>+<span class="n">08</span><span class="s">}</span><span class="s">]</span></code>
, that is it
matches the characters whose code points in Unicode are 6, 7, and 8.
But that <code class="inline">\<span class="w">x08</span></code>
might indicate that you meant something different, so
the warning gets raised.</p>
</li>
<li>
<p><a href="perldiag.html#Can't-do-%25s(%22%25s%22)-on-non-UTF-8-locale%3b-resolved-to-%22%25s%22.">Can't do %s(%s) on non-UTF-8 locale; resolved to %s.</a></p>
<p>(W locale) You are 1) running under "<code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">locale</span></code>
"; 2) the current
locale is not a UTF-8 one; 3) you tried to do the designated case-change
operation on the specified Unicode character; and 4) the result of this
operation would mix Unicode and locale rules, which likely conflict.</p>
<p>The warnings category <code class="inline"><span class="w">locale</span></code>
is new.</p>
</li>
<li>
<p><a href="perldiag.html#%3aconst-is-experimental">:const is experimental</a></p>
<p>(S experimental::const_attr) The <code class="inline"><span class="w">const</span></code>
attribute is experimental.
If you want to use the feature, disable the warning with <code class="inline"><a class="l_k" href="functions/no.html">no</a> <span class="w">warnings</span>
<span class="q">'experimental::const_attr'</span></code>
, but know that in doing so you are taking
the risk that your code may break in a future Perl version.</p>
</li>
<li>
<p><a href="perldiag.html#gmtime(%25f)-failed">gmtime(%f) failed</a></p>
<p>(W overflow) You called <code class="inline"><a class="l_k" href="functions/gmtime.html">gmtime</a></code> with a number that it could not handle:
too large, too small, or NaN. The returned value is <code class="inline"><a class="l_k" href="functions/undef.html">undef</a></code>.</p>
</li>
<li>
<p><a href="perldiag.html#Hexadecimal-float%3a-exponent-overflow">Hexadecimal float: exponent overflow</a></p>
<p>(W overflow) The hexadecimal floating point has larger exponent
than the floating point supports.</p>
</li>
<li>
<p><a href="perldiag.html#Hexadecimal-float%3a-exponent-underflow">Hexadecimal float: exponent underflow</a></p>
<p>(W overflow) The hexadecimal floating point has smaller exponent
than the floating point supports.</p>
</li>
<li>
<p><a href="perldiag.html#Hexadecimal-float%3a-mantissa-overflow">Hexadecimal float: mantissa overflow</a></p>
<p>(W overflow) The hexadecimal floating point literal had more bits in
the mantissa (the part between the <code class="inline"><span class="n">0</span>x</code>
and the exponent, also known as
the fraction or the significand) than the floating point supports.</p>
</li>
<li>
<p><a href="perldiag.html#Hexadecimal-float%3a-precision-loss">Hexadecimal float: precision loss</a></p>
<p>(W overflow) The hexadecimal floating point had internally more
digits than could be output. This can be caused by unsupported
long double formats, or by 64-bit integers not being available
(needed to retrieve the digits under some configurations).</p>
</li>
<li>
<p><a href="perldiag.html#Locale-'%25s'-may-not-work-well.%25s">Locale '%s' may not work well.%s</a></p>
<p>(W locale) You are using the named locale, which is a non-UTF-8 one, and
which perl has determined is not fully compatible with what it can
handle. The second <code class="inline"><span class="i">%s</span></code>
gives a reason.</p>
<p>The warnings category <code class="inline"><span class="w">locale</span></code>
is new.</p>
</li>
<li>
<p><a href="perldiag.html#localtime(%25f)-failed">localtime(%f) failed</a></p>
<p>(W overflow) You called <code class="inline"><a class="l_k" href="functions/localtime.html">localtime</a></code> with a number that it could not handle:
too large, too small, or NaN. The returned value is <code class="inline"><a class="l_k" href="functions/undef.html">undef</a></code>.</p>
</li>
<li>
<p><a href="perldiag.html#Negative-repeat-count-does-nothing">Negative repeat count does nothing</a></p>
<p>(W numeric) You tried to execute the
<a href="perlop.html#Multiplicative-Operators">x </a> repetition operator fewer than 0
times, which doesn't make sense.</p>
</li>
<li>
<p><a href="perldiag.html#NO-BREAK-SPACE-in-a-charnames-alias-definition-is-deprecated">NO-BREAK SPACE in a charnames alias definition is deprecated</a></p>
<p>(D deprecated) You defined a character name which contained a no-break
space character. Change it to a regular space. Usually these names are
defined in the <code class="inline"><span class="j">:</span><span class="w">alias</span></code>
import argument to <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">charnames</span></code>
, but they
could be defined by a translator installed into <code class="inline"><span class="i">$^H</span>{<span class="w">charnames</span>}</code>
. See
<a href="charnames.html#CUSTOM-ALIASES">CUSTOM ALIASES in charnames</a>.</p>
</li>
<li>
<p><a href="perldiag.html#Non-finite-repeat-count-does-nothing">Non-finite repeat count does nothing</a></p>
<p>(W numeric) You tried to execute the
<a href="perlop.html#Multiplicative-Operators">x </a> repetition operator <code class="inline"><span class="w">Inf</span></code>
(or
<code class="inline">-<span class="w">Inf</span></code>
) or NaN times, which doesn't make sense.</p>
</li>
<li>
<p><a href="perldiag.html#PerlIO-layer-'%3awin32'-is-experimental">PerlIO layer ':win32' is experimental</a></p>
<p>(S experimental::win32_perlio) The <code class="inline"><span class="j">:</span><span class="w">win32</span></code>
PerlIO layer is
experimental. If you want to take the risk of using this layer,
simply disable this warning:</p>
<pre class="verbatim"><ol><li> <a class="l_k" href="functions/no.html">no</a> <span class="w">warnings</span> <span class="q">"experimental::win32_perlio"</span><span class="sc">;</span></li></ol></pre></li>
<li>
<p><a href="perldiag.html#Ranges-of-ASCII-printables-should-be-some-subset-of-%220-9%22%2c-%22A-Z%22%2c-or-%22a-z%22-in-regex%3b-marked-by-%3c---HERE-in-m%2f%25s%2f">Ranges of ASCII printables should be some subset of 0-9, A-Z, or a-z in regex; marked by <-- HERE in m/%s/</a></p>
<p>(W regexp) (only under <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">re</span> <span class="q">'strict'</span></code>
or within <code class="inline"><span class="s">(</span><span class="q">?[...])</span></code>
)</p>
<p>Stricter rules help to find typos and other errors. Perhaps you didn't
even intend a range here, if the <code class="inline"><span class="q">"-"</span></code>
was meant to be some other
character, or should have been escaped (like <code class="inline"><span class="q">"\-"</span></code>
). If you did
intend a range, the one that was used is not portable between ASCII and
EBCDIC platforms, and doesn't have an obvious meaning to a casual
reader.</p>
<pre class="verbatim"><ol><li> <span class="s">[</span><span class="n">3</span>-<span class="n">7</span><span class="s">]</span> <span class="c"># OK; Obvious and portable</span></li><li> <span class="s">[</span><span class="w">d</span>-g<span class="s">]</span> <span class="c"># OK; Obvious and portable</span></li><li> <span class="s">[</span><span class="w">A</span>-<span class="w">Y</span><span class="s">]</span> <span class="c"># OK; Obvious and portable</span></li><li> <span class="s">[</span><span class="w">A</span>-z<span class="s">]</span> <span class="c"># WRONG; Not portable; not clear what is meant</span></li><li> <span class="s">[</span><span class="w">a</span>-<span class="w">Z</span><span class="s">]</span> <span class="c"># WRONG; Not portable; not clear what is meant</span></li><li> <span class="s">[</span><span class="i">%-</span>.<span class="s">]</span> <span class="c"># WRONG; Not portable; not clear what is meant</span></li><li> <span class="s">[</span>\<span class="w">x41</span>-<span class="w">Z</span><span class="s">]</span> <span class="c"># WRONG; Not portable; not obvious to non-geek</span></li></ol></pre><p>(You can force portability by specifying a Unicode range, which means that
the endpoints are specified by
<a href="perlrecharclass.html#Character-Ranges">\N{...} </a>, but the meaning may
still not be obvious.)
The stricter rules require that ranges that start or stop with an ASCII
character that is not a control have all their endpoints be a literal
character, and not some escape sequence (like <code class="inline"><span class="q">"\x41"</span></code>
), and the ranges
must be all digits, or all uppercase letters, or all lowercase letters.</p>
</li>
<li>
<p><a href="perldiag.html#Ranges-of-digits-should-be-from-the-same-group-in-regex%3b-marked-by-%3c---HERE-in-m%2f%25s%2f">Ranges of digits should be from the same group in regex; marked by <-- HERE in m/%s/</a></p>
<p>(W regexp) (only under <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">re</span> <span class="q">'strict'</span></code>
or within <code class="inline"><span class="s">(</span><span class="q">?[...])</span></code>
)</p>
<p>Stricter rules help to find typos and other errors. You included a
range, and at least one of the end points is a decimal digit. Under the
stricter rules, when this happens, both end points should be digits in
the same group of 10 consecutive digits.</p>
</li>
<li>
<p><a href="perldiag.html#Redundant-argument-in-%25s">Redundant argument in %s</a></p>
<p>(W redundant) You called a function with more arguments than were
needed, as indicated by information within other arguments you supplied
(<i>e.g</i>. a printf format). Currently only emitted when a printf-type format
required fewer arguments than were supplied, but might be used in the
future for <i>e.g.</i> <a href="functions/pack.html">pack</a>.</p>
<p>The warnings category <code class="inline"><span class="w">redundant</span></code>
is new. See also
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121025">[perl #121025]</a>.</p>
</li>
<li>
<p><a href="perldiag.html#Replacement-list-is-longer-than-search-list">Replacement list is longer than search list</a></p>
<p>This is not a new diagnostic, but in earlier releases was accidentally
not displayed if the transliteration contained wide characters. This is
now fixed, so that you may see this diagnostic in places where you
previously didn't (but should have).</p>
</li>
<li>
<p><a href="perldiag.html#Use-of-%5cb%7b%7d-for-non-UTF-8-locale-is-wrong.-Assuming-a-UTF-8-locale">Use of \b{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale</a></p>
<p>(W locale) You are matching a regular expression using locale rules,
and a Unicode boundary is being matched, but the locale is not a Unicode
one. This doesn't make sense. Perl will continue, assuming a Unicode
(UTF-8) locale, but the results could well be wrong except if the locale
happens to be ISO-8859-1 (Latin1) where this message is spurious and can
be ignored.</p>
<p>The warnings category <code class="inline"><span class="w">locale</span></code>
is new.</p>
</li>
<li>
<p><a href="perldiag.html#Using-%2fu-for-'%25s'-instead-of-%2f%25s-in-regex%3b-marked-by-%3c---HERE-in-m%2f%25s%2f">Using /u for '%s' instead of /%s in regex; marked by <-- HERE in m/%s/</a></p>
<p>(W regexp) You used a Unicode boundary (<code class="inline">\<span class="i">b</span><span class="s">{</span>...<span class="s">}</span></code>
or <code class="inline">\<span class="i">B</span><span class="s">{</span>...<span class="s">}</span></code>
) in a
portion of a regular expression where the character set modifiers <code class="inline"><span class="q">/a</span></code>
or <code class="inline"><span class="q">/aa</span></code>
are in effect. These two modifiers indicate an ASCII
interpretation, and this doesn't make sense for a Unicode definition.
The generated regular expression will compile so that the boundary uses
all of Unicode. No other portion of the regular expression is affected.</p>
</li>
<li>
<p><a href="perldiag.html#The-bitwise-feature-is-experimental">The bitwise feature is experimental</a></p>
<p>(S experimental::bitwise) This warning is emitted if you use bitwise
operators (<code class="inline"><span class="i">& |</span> ^ ~ <span class="i">&.</span> |. ^. ~.</code>
) with the "bitwise" feature enabled.
Simply suppress the warning if you want to use the feature, but know
that in doing so you are taking the risk of using an experimental
feature which may change or be removed in a future Perl version:</p>
<pre class="verbatim"><ol><li> <a class="l_k" href="functions/no.html">no</a> <span class="w">warnings</span> <span class="q">"experimental::bitwise"</span><span class="sc">;</span></li><li> <a class="l_k" href="functions/use.html">use</a> <span class="w">feature</span> <span class="q">"bitwise"</span><span class="sc">;</span></li><li> <span class="i">$x</span> |.= <span class="i">$y</span><span class="sc">;</span></li></ol></pre></li>
<li>
<p><a href="perldiag.html#Unescaped-left-brace-in-regex-is-deprecated%2c-passed-through-in-regex%3b-marked-by-%3c---HERE-in-m%2f%25s%2f">Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%s/</a></p>
<p>(D deprecated, regexp) You used a literal <code class="inline"><span class="q">"{"</span></code>
character in a regular
expression pattern. You should change to use <code class="inline"><span class="q">"\{"</span></code>
instead, because a future
version of Perl (tentatively v5.26) will consider this to be a syntax error. If
the pattern delimiters are also braces, any matching right brace
(<code class="inline"><span class="q">"}"</span></code>
) should also be escaped to avoid confusing the parser, for
example,</p>
<pre class="verbatim"><ol><li> <span class="q">qr{abc\{def\}ghi}</span></li></ol></pre></li>
<li>
<p><a href="perldiag.html#Use-of-literal-non-graphic-characters-in-variable-names-is-deprecated">Use of literal non-graphic characters in variable names is deprecated</a></p>
<p>(D deprecated) Using literal non-graphic (including control)
characters in the source to refer to the <i>^FOO</i> variables, like <code class="inline"><span class="i">$^X</span></code>
and
<code class="inline"><span class="i">$</span>{<span class="w">^GLOBAL_PHASE</span>}</code>
is now deprecated.</p>
</li>
<li>
<p><a href="perldiag.html#Useless-use-of-attribute-%22const%22">Useless use of attribute const</a></p>
<p>(W misc) The <code class="inline"><span class="w">const</span></code>
attribute has no effect except
on anonymous closure prototypes. You applied it to
a subroutine via <a href="attributes.html">attributes.pm</a>. This is only useful
inside an attribute handler for an anonymous subroutine.</p>
</li>
<li>
<p><a href="perldiag.html#Useless-use-of-%2fd-modifier-in-transliteration-operator">Useless use of /d modifier in transliteration operator</a></p>
<p>This is not a new diagnostic, but in earlier releases was accidentally
not displayed if the transliteration contained wide characters. This is
now fixed, so that you may see this diagnostic in places where you
previously didn't (but should have).</p>
</li>
<li>
<p><a href="perldiag.html#%22use-re-'strict'%22-is-experimental">use re 'strict' is experimental</a></p>
<p>(S experimental::re_strict) The things that are different when a regular
expression pattern is compiled under <code class="inline"><span class="q">'strict'</span></code>
are subject to change
in future Perl releases in incompatible ways; there are also proposals
to change how to enable strict checking instead of using this subpragma.
This means that a pattern that compiles today may not in a future Perl
release. This warning is to alert you to that risk.</p>
</li>
<li>
<p><a href="perldiag.html#Warning%3a-unable-to-close-filehandle-properly%3a-%25s">Warning: unable to close filehandle properly: %s</a></p>
<p><a href="perldiag.html#Warning%3a-unable-to-close-filehandle-%25s-properly%3a-%25s">Warning: unable to close filehandle %s properly: %s</a></p>
<p>(S io) Previously, perl silently ignored any errors when doing an implicit
close of a filehandle, <i>i.e.</i> where the reference count of the filehandle
reached zero and the user's code hadn't already called <code class="inline"><a class="l_k" href="functions/close.html">close()</a></code>; <i>e.g.</i></p>
<pre class="verbatim"><ol><li> <span class="s">{</span></li><li> <a class="l_k" href="functions/open.html">open</a> <a class="l_k" href="functions/my.html">my</a> <span class="i">$fh</span><span class="cm">,</span> <span class="q">'>'</span><span class="cm">,</span> <span class="i">$file</span> <a class="l_k" href="functions/or.html">or</a> <a class="l_k" href="functions/die.html">die</a> <span class="q">"open: '$file': $!\n"</span><span class="sc">;</span></li><li> <a class="l_k" href="functions/print.html">print</a> <span class="i">$fh</span><span class="cm">,</span> <span class="i">$data</span> <a class="l_k" href="functions/or.html">or</a> <a class="l_k" href="functions/die.html">die</a><span class="sc">;</span></li><li> <span class="s">}</span> <span class="c"># implicit close here</span></li></ol></pre><p>In a situation such as disk full, due to buffering, the error may only be
detected during the final close, so not checking the result of the close is
dangerous.</p>
<p>So perl now warns in such situations.</p>
</li>
<li>
<p><a href="perldiag.html#Wide-character-(U%2b%25X)-in-%25s">Wide character (U+%X) in %s</a></p>
<p>(W locale) While in a single-byte locale (<i>i.e.</i>, a non-UTF-8
one), a multi-byte character was encountered. Perl considers this
character to be the specified Unicode code point. Combining non-UTF-8
locales and Unicode is dangerous. Almost certainly some characters
will have two different representations. For example, in the ISO 8859-7
(Greek) locale, the code point 0xC3 represents a Capital Gamma. But so
also does 0x393. This will make string comparisons unreliable.</p>
<p>You likely need to figure out how this multi-byte character got mixed up
with your single-byte locale (or perhaps you thought you had a UTF-8
locale, but Perl disagrees).</p>
<p>The warnings category <code class="inline"><span class="w">locale</span></code>
is new.</p>
</li>
</ul>
<a name="Changes-to-Existing-Diagnostics"></a><h2>Changes to Existing Diagnostics</h2>
<ul>
<li>
<p><> should be quotes</p>
<p>This warning has been changed to
<a href="perldiag.html#%3c%3e-at-require-statement-should-be-quotes"><> at require-statement should be quotes</a>
to make the issue more identifiable.</p>
</li>
<li>
<p><a href="perldiag.html#Argument-%22%25s%22-isn't-numeric%25s">Argument %s isn't numeric%s</a></p>
<p>The <a href="perldiag.html">perldiag</a> entry for this warning has added this clarifying note:</p>
<pre class="verbatim"><ol><li> <span class="w">Note</span> <span class="w">that</span> <a class="l_k" href="functions/for.html">for</a> <span class="w">the</span> <span class="w">Inf</span> <a class="l_k" href="functions/and.html">and</a> <span class="w">NaN</span> <span class="s">(</span><span class="w">infinity</span> <a class="l_k" href="functions/and.html">and</a> <a class="l_k" href="functions/not.html">not</a>-<span class="w">a</span>-<span class="w">number</span><span class="s">)</span> <span class="w">the</span></li><li> <span class="w">definition</span> <span class="w">of</span> <span class="q">"numeric"</span> <span class="w">is</span> <span class="w">somewhat</span> <span class="w">unusual</span><span class="co">:</span> <span class="w">the</span> <span class="w">strings</span> <span class="i">themselves</span></li><li> <span class="s">(</span><span class="w">like</span> <span class="q">"Inf"</span><span class="s">)</span> <span class="w">are</span> <span class="w">considered</span> <span class="w">numeric</span><span class="cm">,</span> <a class="l_k" href="functions/and.html">and</a> <span class="w">anything</span> <span class="w">following</span> <span class="w">them</span> <span class="w">is</span></li><li> <span class="w">considered</span> <span class="w">non</span>-<span class="w">numeric</span>.</li></ol></pre></li>
<li>
<p><a href="perldiag.html#Global-symbol-%22%25s%22-requires-explicit-package-name-(did-you-forget-to-declare-%22my-%25s%22%3f)">Global symbol %s requires explicit package name</a></p>
<p>This message has had '(did you forget to declare "my %s"?)' appended to it, to
make it more helpful to new Perl programmers.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121638">[perl #121638]</a></p>
</li>
<li>
<p>'"my" variable &foo::bar can't be in a package' has been reworded to say
'subroutine' instead of 'variable'.</p>
</li>
<li>
<p><a href="perldiag.html#%5cN%7b%7d-in-inverted-character-class-or-as-a-range-end-point-is-restricted-to-one-character-in-regex%3b-marked-by-%3c---HERE-in-m%2f%25s%2f">\N{} in character class restricted to one character in regex; marked by <-- HERE in m/%s/</a></p>
<p>This message has had <i>character class</i> changed to <i>inverted character
class or as a range end-point is</i> to reflect improvements in
<code class="inline"><span class="q">qr/[\N{named sequence}]/</span></code>
(see under <a href="#Selected-Bug-Fixes">Selected Bug Fixes</a>).</p>
</li>
<li>
<p><a href="perldiag.html#panic%3a-frexp%3a-%25f">panic: frexp</a></p>
<p>This message has had ': <code class="inline"><span class="i">%f</span></code>
' appended to it, to show what the offending
floating point number is.</p>
</li>
<li>
<p><i>Possible precedence problem on bitwise %c operator</i> reworded as
<a href="perldiag.html#Possible-precedence-problem-on-bitwise-%25s-operator">Possible precedence problem on bitwise %s operator</a>.</p>
</li>
<li>
<p><a href="perldiag.html#Unsuccessful-%25s-on-filename-containing-newline">Unsuccessful %s on filename containing newline</a></p>
<p>This warning is now only produced when the newline is at the end of
the filename.</p>
</li>
<li>
<p>"Variable <code class="inline"><span class="i">%s</span></code>
will not stay shared" has been changed to say "Subroutine"
when it is actually a lexical sub that will not stay shared.</p>
</li>
<li>
<p><a href="perldiag.html#Variable-length-lookbehind-not-implemented-in-regex-m%2f%25s%2f">Variable length lookbehind not implemented in regex m/%s/</a></p>
<p>The <a href="perldiag.html">perldiag</a> entry for this warning has had information about Unicode
behavior added.</p>
</li>
</ul>
<a name="Diagnostic-Removals"></a><h2>Diagnostic Removals</h2>
<ul>
<li>
<p>"Ambiguous use of -foo resolved as -&foo()"</p>
<p>There is actually no ambiguity here, and this impedes the use of negated
constants; <i>e.g.</i>, <code class="inline">-<span class="w">Inf</span></code>
.</p>
</li>
<li>
<p>"Constant is not a FOO reference"</p>
<p>Compile-time checking of constant dereferencing (<i>e.g.</i>, <code class="inline"><span class="w">my_constant</span>-><span class="s">(</span><span class="s">)</span></code>
)
has been removed, since it was not taking overloading into account.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d69456">[perl #69456]</a>
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122607">[perl #122607]</a></p>
</li>
</ul>
<a name="Utility-Changes"></a><h1>Utility Changes</h1>
<a name="_find2perl_%2c-_s2p_-and-_a2p_-removal"></a><h2><i>find2perl</i>, <i>s2p</i> and <i>a2p</i> removal</h2>
<ul>
<li>
<p>The <i>x2p/</i> directory has been removed from the Perl core.</p>
<p>This removes find2perl, s2p and a2p. They have all been released to CPAN as
separate distributions (<code class="inline"><span class="w">App::find2perl</span></code>
, <code class="inline"><span class="w">App::s2p</span></code>
, <code class="inline"><span class="w">App::a2p</span></code>
).</p>
</li>
</ul>
<a name="the-h2ph-manpage"></a><h2><a href="h2ph.html">h2ph</a></h2>
<ul>
<li>
<p><i>h2ph</i> now handles hexadecimal constants in the compiler's predefined
macro definitions, as visible in <code class="inline"><span class="i">$Config</span>{<span class="w">cppsymbols</span>}</code>
.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123784">[perl #123784]</a>.</p>
</li>
</ul>
<a name="the-encguess-manpage"></a><h2><a href="encguess.html">encguess</a></h2>
<ul>
<li>
<p>No longer depends on non-core modules.</p>
</li>
</ul>
<a name="Configuration-and-Compilation"></a><h1>Configuration and Compilation</h1>
<ul>
<li>
<p><i>Configure</i> now checks for <code class="inline"><span class="i">lrintl</span><span class="s">(</span><span class="s">)</span></code>
, <code class="inline"><span class="i">lroundl</span><span class="s">(</span><span class="s">)</span></code>
, <code class="inline"><span class="i">llrintl</span><span class="s">(</span><span class="s">)</span></code>
, and
<code class="inline"><span class="i">llroundl</span><span class="s">(</span><span class="s">)</span></code>
.</p>
</li>
<li>
<p><i>Configure</i> with <code class="inline">-<span class="w">Dmksymlinks</span></code>
should now be faster.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122002">[perl #122002]</a>.</p>
</li>
<li>
<p>The <code class="inline"><span class="w">pthreads</span></code>
and <code class="inline"><span class="w">cl</span></code>
libraries will be linked by default if present.
This allows XS modules that require threading to work on non-threaded
perls. Note that you must still pass <code class="inline">-<span class="w">Dusethreads</span></code>
if you want a
threaded perl.</p>
</li>
<li>
<p>For long doubles (to get more precision and range for floating point numbers)
one can now use the GCC quadmath library which implements the quadruple
precision floating point numbers on x86 and IA-64 platforms. See
<i>INSTALL</i> for details.</p>
</li>
<li>
<p>MurmurHash64A and MurmurHash64B can now be configured as the internal hash
function.</p>
</li>
<li>
<p><code class="inline"><span class="w">make</span> <span class="w">test</span>.<span class="w">valgrind</span></code>
now supports parallel testing.</p>
<p>For example:</p>
<pre class="verbatim"><ol><li> <span class="w">TEST_JOBS</span>=<span class="n">9</span> <span class="w">make</span> <span class="w">test</span>.<span class="w">valgrind</span></li></ol></pre><p>See <a href="perlhacktips.html#valgrind">valgrind in perlhacktips</a> for more information.</p>
<p><a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121431">[perl #121431]</a></p>
</li>
<li>
<p>The MAD (Misc Attribute Decoration) build option has been removed</p>
<p>This was an unmaintained attempt at preserving
the Perl parse tree more faithfully so that automatic conversion of
Perl 5 to Perl 6 would have been easier.</p>
<p>This build-time configuration option had been unmaintained for years,
and had probably seriously diverged on both Perl 5 and Perl 6 sides.</p>
</li>
<li>
<p>A new compilation flag, <code class="inline">-<span class="w">DPERL_OP_PARENT</span></code>
is available. For details,
see the discussion below at <a href="#Internal-Changes">Internal Changes</a>.</p>
</li>
<li>
<p>Pathtools no longer tries to load XS on miniperl. This speeds up building perl
slightly.</p>
</li>
</ul>
<a name="Testing"></a><h1>Testing</h1>
<ul>
<li>
<p><i>t/porting/re_context.t</i> has been added to test that <a href="utf8.html">utf8</a> and its
dependencies only use the subset of the <code class="inline"><span class="i">$1</span>..<span class="i">$n</span></code>
capture vars that
<code class="inline"><span class="i">Perl_save_re_context</span><span class="s">(</span><span class="s">)</span></code>
is hard-coded to localize, because that function
has no efficient way of determining at runtime what vars to localize.</p>
</li>
<li>
<p>Tests for performance issues have been added in the file <i>t/perf/taint.t</i>.</p>
</li>
<li>
<p>Some regular expression tests are written in such a way that they will
run very slowly if certain optimizations break. These tests have been
moved into new files, <i>t/re/speed.t</i> and <i>t/re/speed_thr.t</i>,
and are run with a <code class="inline"><span class="i">watchdog</span><span class="s">(</span><span class="s">)</span></code>
.</p>
</li>
<li>
<p><code class="inline"><span class="w">test</span>.<span class="w">pl</span></code>
now allows <code class="inline"><span class="w">plan</span> <span class="w">skip_all</span> <span class="cm">=></span> <span class="i">$reason</span></code>
, to make it
more compatible with <code class="inline"><span class="w">Test::More</span></code>
.</p>
</li>
<li>
<p>A new test script, <i>op/infnan.t</i>, has been added to test if infinity and NaN are
working correctly. See <a href="#Infinity-and-NaN-(not-a-number)-handling-improved">Infinity and NaN (not-a-number) handling improved</a>.</p>
</li>
</ul>
<a name="Platform-Support"></a><h1>Platform Support</h1>
<a name="Regained-Platforms"></a><h2>Regained Platforms</h2>
<ul>
<li><a name="IRIX-and-Tru64-platforms-are-working-again."></a><b>IRIX and Tru64 platforms are working again.</b>
<p>Some <code class="inline"><span class="w">make</span> <span class="w">test</span></code>
failures remain:
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123977">[perl #123977]</a>
and <a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d125298">[perl #125298]</a>
for IRIX; <a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d124212">[perl #124212]</a>,
<a href="http://search.cpan.org/perldoc/https:#%2frt.cpan.org%2fPublic%2fBug%2fDisplay.html%3fid%3d99605">[cpan #99605]</a>, and
<a href="http://search.cpan.org/perldoc/https:#%2frt.cpan.org%2fTicket%2fDisplay.html%3fid%3d104836">[cpan #104836</a> for Tru64.</p>
</li>
<li><a name="z%2fOS-running-EBCDIC-Code-Page-1047"></a><b>z/OS running EBCDIC Code Page 1047</b>
<p>Core perl now works on this EBCDIC platform. Earlier perls also worked, but,
even though support wasn't officially withdrawn, recent perls would not compile
and run well. Perl 5.20 would work, but had many bugs which have now been
fixed. Many CPAN modules that ship with Perl still fail tests, including
<code class="inline"><span class="w">Pod::Simple</span></code>
. However the version of <code class="inline"><span class="w">Pod::Simple</span></code>
currently on CPAN should work;
it was fixed too late to include in Perl 5.22. Work is under way to fix many
of the still-broken CPAN modules, which likely will be installed on CPAN when
completed, so that you may not have to wait until Perl 5.24 to get a working
version.</p>
</li>
</ul>
<a name="Discontinued-Platforms"></a><h2>Discontinued Platforms</h2>
<ul>
<li><a name="NeXTSTEP%2fOPENSTEP"></a><b>NeXTSTEP/OPENSTEP</b>
<p>NeXTSTEP was a proprietary operating system bundled with NeXT's
workstations in the early to mid 90s; OPENSTEP was an API specification
that provided a NeXTSTEP-like environment on a non-NeXTSTEP system. Both
are now long dead, so support for building Perl on them has been removed.</p>
</li>
</ul>
<a name="Platform-Specific-Notes"></a><h2>Platform-Specific Notes</h2>
<ul>
<li><a name="EBCDIC"></a><b>EBCDIC</b>
<p>Special handling is required of the perl interpreter on EBCDIC platforms
to get <code class="inline"><a class="l_k" href="functions/qr.html">qr/[i-j]/</a></code> to match only <code class="inline"><span class="q">"i"</span></code>
and <code class="inline"><span class="q">"j"</span></code>
, since there are 7
characters between the
code points for <code class="inline"><span class="q">"i"</span></code>
and <code class="inline"><span class="q">"j"</span></code>
. This special handling had only been
invoked when both ends of the range are literals. Now it is also
invoked if any of the <code class="inline">\<span class="i">N</span><span class="s">{</span>...<span class="s">}</span></code>
forms for specifying a character by
name or Unicode code point is used instead of a literal. See
<a href="perlrecharclass.html#Character-Ranges">Character Ranges in perlrecharclass</a>.</p>
</li>
<li><a name="HP-UX"></a><b>HP-UX</b>
<p>The archname now distinguishes use64bitint from use64bitall.</p>
</li>
<li><a name="Android"></a><b>Android</b>
<p>Build support has been improved for cross-compiling in general and for
Android in particular.</p>
</li>
<li><a name="VMS"></a><b>VMS</b>
<ul>
<li>
<p>When spawning a subprocess without waiting, the return value is now
the correct PID.</p>
</li>
<li>
<p>Fix a prototype so linking doesn't fail under the VMS C++ compiler.</p>
</li>
<li>
<p><code class="inline"><span class="w">finite</span></code>
, <code class="inline"><span class="w">finitel</span></code>
, and <code class="inline"><span class="w">isfinite</span></code>
detection has been added to
<code class="inline"><span class="w">configure</span>.<span class="w">com</span></code>
, environment handling has had some minor changes, and
a fix for legacy feature checking status.</p>
</li>
</ul>
</li>
<li><a name="Win32"></a><b>Win32</b>
<ul>
<li>
<p><i>miniperl.exe</i> is now built with <code class="inline">-<span class="w">fno</span>-<span class="w">strict</span>-<span class="w">aliasing</span></code>
, allowing 64-bit
builds to complete on GCC 4.8.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123976">[perl #123976]</a></p>
</li>
<li>
<p><code class="inline"><span class="w">nmake</span> <span class="w">minitest</span></code>
now works on Win32. Due to dependency issues you
need to build <code class="inline"><span class="w">nmake</span> <span class="w">test</span>-<span class="w">prep</span></code>
first, and a small number of the
tests fail.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123394">[perl #123394]</a></p>
</li>
<li>
<p>Perl can now be built in C++ mode on Windows by setting the makefile macro
<code class="inline"><span class="w">USE_CPLUSPLUS</span></code>
to the value "define".</p>
</li>
<li>
<p>The list form of piped open has been implemented for Win32. Note: unlike
<code class="inline"><a class="l_k" href="functions/system.html">system</a> <span class="i">LIST</span></code>
this does not fall back to the shell.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121159">[perl #121159]</a></p>
</li>
<li>
<p>New <code class="inline"><span class="w">DebugSymbols</span></code>
and <code class="inline"><span class="w">DebugFull</span></code>
configuration options added to
Windows makefiles.</p>
</li>
<li>
<p>Previously, compiling XS modules (including CPAN ones) using Visual C++ for
Win64 resulted in around a dozen warnings per file from <i>hv_func.h</i>. These
warnings have been silenced.</p>
</li>
<li>
<p>Support for building without PerlIO has been removed from the Windows
makefiles. Non-PerlIO builds were all but deprecated in Perl 5.18.0 and are
already not supported by <i>Configure</i> on POSIX systems.</p>
</li>
<li>
<p>Between 2 and 6 milliseconds and seven I/O calls have been saved per attempt
to open a perl module for each path in <code class="inline"><span class="i">@INC</span></code>
.</p>
</li>
<li>
<p>Intel C builds are now always built with C99 mode on.</p>
</li>
<li>
<p><code class="inline"><span class="i">%I64d</span></code>
is now being used instead of <code class="inline"><span class="i">%lld</span></code>
for MinGW.</p>
</li>
<li>
<p>In the experimental <code class="inline"><span class="j">:</span><span class="w">win32</span></code>
layer, a crash in <code class="inline"><a class="l_k" href="functions/open.html">open</a></code> was fixed. Also
opening <i>/dev/null</i> (which works under Win32 Perl's default <code class="inline"><span class="j">:</span><span class="w">unix</span></code>
layer) was implemented for <code class="inline"><span class="j">:</span><span class="w">win32</span></code>
.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122224">[perl #122224]</a></p>
</li>
<li>
<p>A new makefile option, <code class="inline"><span class="w">USE_LONG_DOUBLE</span></code>
, has been added to the Windows
dmake makefile for gcc builds only. Set this to "define" if you want perl to
use long doubles to give more accuracy and range for floating point numbers.</p>
</li>
</ul>
</li>
<li><a name="OpenBSD"></a><b>OpenBSD</b>
<p>On OpenBSD, Perl will now default to using the system <code class="inline"><span class="w">malloc</span></code>
due to the
security features it provides. Perl's own malloc wrapper has been in use
since v5.14 due to performance reasons, but the OpenBSD project believes
the tradeoff is worth it and would prefer that users who need the speed
specifically ask for it.</p>
<p><a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122000">[perl #122000]</a>.</p>
</li>
<li><a name="Solaris"></a><b>Solaris</b>
<ul>
<li>
<p>We now look for the Sun Studio compiler in both <i>/opt/solstudio*</i> and
<i>/opt/solarisstudio*</i>.</p>
</li>
<li>
<p>Builds on Solaris 10 with <code class="inline">-<span class="w">Dusedtrace</span></code>
would fail early since make
didn't follow implied dependencies to build <code class="inline"><span class="w">perldtrace</span>.<span class="w">h</span></code>
. Added an
explicit dependency to <code class="inline"><span class="w">depend</span></code>
.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d120120">[perl #120120]</a></p>
</li>
<li>
<p>C99 options have been cleaned up; hints look for <code class="inline"><span class="w">solstudio</span></code>
as well as <code class="inline"><span class="w">SUNWspro</span></code>
; and support for native <code class="inline"><span class="w">setenv</span></code>
has been added.</p>
</li>
</ul>
</li>
</ul>
<a name="Internal-Changes"></a><h1>Internal Changes</h1>
<ul>
<li>
<p>Experimental support has been added to allow ops in the optree to locate
their parent, if any. This is enabled by the non-default build option
<code class="inline">-<span class="w">DPERL_OP_PARENT</span></code>
. It is envisaged that this will eventually become
enabled by default, so XS code which directly accesses the <code class="inline"><span class="w">op_sibling</span></code>
field of ops should be updated to be future-proofed.</p>
<p>On <code class="inline"><span class="w">PERL_OP_PARENT</span></code>
builds, the <code class="inline"><span class="w">op_sibling</span></code>
field has been renamed
<code class="inline"><span class="w">op_sibparent</span></code>
and a new flag, <code class="inline"><span class="w">op_moresib</span></code>
, added. On the last op in a
sibling chain, <code class="inline"><span class="w">op_moresib</span></code>
is false and <code class="inline"><span class="w">op_sibparent</span></code>
points to the
parent (if any) rather than being <code class="inline"><span class="w">NULL</span></code>
.</p>
<p>To make existing code work transparently whether using <code class="inline"><span class="w">PERL_OP_PARENT</span></code>
or not, a number of new macros and functions have been added that should
be used, rather than directly manipulating <code class="inline"><span class="w">op_sibling</span></code>
.</p>
<p>For the case of just reading <code class="inline"><span class="w">op_sibling</span></code>
to determine the next sibling,
two new macros have been added. A simple scan through a sibling chain
like this:</p>
<pre class="verbatim"><ol><li> <a class="l_k" href="functions/for.html">for</a> <span class="s">(</span><span class="sc">;</span> <span class="w">kid</span><span class="w">->op_sibling</span><span class="sc">;</span> <span class="w">kid</span> = <span class="w">kid</span><span class="w">->op_sibling</span><span class="s">)</span> <span class="s">{</span> ... <span class="s">}</span></li></ol></pre><p>should now be written as:</p>
<pre class="verbatim"><ol><li> <a class="l_k" href="functions/for.html">for</a> <span class="s">(</span><span class="sc">;</span> <span class="i">OpHAS_SIBLING</span><span class="s">(</span><span class="w">kid</span><span class="s">)</span><span class="sc">;</span> <span class="w">kid</span> = <span class="i">OpSIBLING</span><span class="s">(</span><span class="w">kid</span><span class="s">)</span><span class="s">)</span> <span class="s">{</span> ... <span class="s">}</span></li></ol></pre><p>For altering optrees, a general-purpose function <code class="inline"><span class="i">op_sibling_splice</span><span class="s">(</span><span class="s">)</span></code>
has been added, which allows for manipulation of a chain of sibling ops.
By analogy with the Perl function <code class="inline"><a class="l_k" href="functions/splice.html">splice()</a></code>, it allows you to cut out
zero or more ops from a sibling chain and replace them with zero or more
new ops. It transparently handles all the updating of sibling, parent,
op_last pointers etc.</p>
<p>If you need to manipulate ops at a lower level, then three new macros,
<code class="inline"><span class="w">OpMORESIB_set</span></code>
, <code class="inline"><span class="w">OpLASTSIB_set</span></code>
and <code class="inline"><span class="w">OpMAYBESIB_set</span></code>
are intended to
be a low-level portable way to set <code class="inline"><span class="w">op_sibling</span></code>
/ <code class="inline"><span class="w">op_sibparent</span></code>
while
also updating <code class="inline"><span class="w">op_moresib</span></code>
. The first sets the sibling pointer to a new
sibling, the second makes the op the last sibling, and the third
conditionally does the first or second action. Note that unlike
<code class="inline"><span class="i">op_sibling_splice</span><span class="s">(</span><span class="s">)</span></code>
these macros won't maintain consistency in the
parent at the same time (<i>e.g.</i> by updating <code class="inline"><span class="w">op_first</span></code>
and <code class="inline"><span class="w">op_last</span></code>
where
appropriate).</p>
<p>A C-level <code class="inline"><span class="i">Perl_op_parent</span><span class="s">(</span><span class="s">)</span></code>
function and a Perl-level <code class="inline"><span class="i">B::OP::parent</span><span class="s">(</span><span class="s">)</span></code>
method have been added. The C function only exists under
<code class="inline"><span class="w">PERL_OP_PARENT</span></code>
builds (using it is build-time error on vanilla
perls). <code class="inline"><span class="i">B::OP::parent</span><span class="s">(</span><span class="s">)</span></code>
exists always, but on a vanilla build it
always returns <code class="inline"><span class="w">NULL</span></code>
. Under <code class="inline"><span class="w">PERL_OP_PARENT</span></code>
, they return the parent
of the current op, if any. The variable <code class="inline"><span class="i">$B::OP::does_parent</span></code>
allows you
to determine whether <code class="inline"><span class="w">B</span></code>
supports retrieving an op's parent.</p>
<p><code class="inline"><span class="w">PERL_OP_PARENT</span></code>
was introduced in 5.21.2, but the interface was
changed considerably in 5.21.11. If you updated your code before the
5.21.11 changes, it may require further revision. The main changes after
5.21.2 were:</p>
<ul>
<li>
<p>The <code class="inline"><span class="w">OP_SIBLING</span></code>
and <code class="inline"><span class="w">OP_HAS_SIBLING</span></code>
macros have been renamed
<code class="inline"><span class="w">OpSIBLING</span></code>
and <code class="inline"><span class="w">OpHAS_SIBLING</span></code>
for consistency with other
op-manipulating macros.</p>
</li>
<li>
<p>The <code class="inline"><span class="w">op_lastsib</span></code>
field has been renamed <code class="inline"><span class="w">op_moresib</span></code>
, and its meaning
inverted.</p>
</li>
<li>
<p>The macro <code class="inline"><span class="w">OpSIBLING_set</span></code>
has been removed, and has been superseded by
<code class="inline"><span class="w">OpMORESIB_set</span></code>
<i>et al</i>.</p>
</li>
<li>
<p>The <code class="inline"><span class="i">op_sibling_splice</span><span class="s">(</span><span class="s">)</span></code>
function now accepts a null <code class="inline"><span class="w">parent</span></code>
argument
where the splicing doesn't affect the first or last ops in the sibling
chain</p>
</li>
</ul>
</li>
<li>
<p>Macros have been created to allow XS code to better manipulate the POSIX locale
category <code class="inline"><span class="w">LC_NUMERIC</span></code>
. See <a href="perlapi.html#Locale-related-functions-and-macros">Locale-related functions and macros in perlapi</a>.</p>
</li>
<li>
<p>The previous <code class="inline"><span class="w">atoi</span></code>
<i>et al</i> replacement function, <code class="inline"><span class="w">grok_atou</span></code>
, has now been
superseded by <code class="inline"><span class="w">grok_atoUV</span></code>
. See <a href="perlclib.html">perlclib</a> for details.</p>
</li>
<li>
<p>A new function, <code class="inline"><span class="i">Perl_sv_get_backrefs</span><span class="s">(</span><span class="s">)</span></code>
, has been added which allows you
retrieve the weak references, if any, which point at an SV.</p>
</li>
<li>
<p>The <code class="inline"><span class="i">screaminstr</span><span class="s">(</span><span class="s">)</span></code>
function has been removed. Although marked as
public API, it was undocumented and had no usage in CPAN modules. Calling
it has been fatal since 5.17.0.</p>
</li>
<li>
<p>The <code class="inline"><span class="i">newDEFSVOP</span><span class="s">(</span><span class="s">)</span></code>
, <code class="inline"><span class="i">block_start</span><span class="s">(</span><span class="s">)</span></code>
, <code class="inline"><span class="i">block_end</span><span class="s">(</span><span class="s">)</span></code>
and <code class="inline"><span class="i">intro_my</span><span class="s">(</span><span class="s">)</span></code>
functions have been added to the API.</p>
</li>
<li>
<p>The internal <code class="inline"><span class="w">convert</span></code>
function in <i>op.c</i> has been renamed
<code class="inline"><span class="w">op_convert_list</span></code>
and added to the API.</p>
</li>
<li>
<p>The <code class="inline"><span class="i">sv_magic</span><span class="s">(</span><span class="s">)</span></code>
function no longer forbids "ext" magic on read-only
values. After all, perl can't know whether the custom magic will modify
the SV or not.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123103">[perl #123103]</a>.</p>
</li>
<li>
<p>Accessing <a href="perlapi.html#CvPADLIST">CvPADLIST in perlapi</a> on an XSUB is now forbidden.</p>
<p>The <code class="inline"><span class="w">CvPADLIST</span></code>
field has been reused for a different internal purpose
for XSUBs. So in particular, you can no longer rely on it being NULL as a
test of whether a CV is an XSUB. Use <code class="inline"><span class="i">CvISXSUB</span><span class="s">(</span><span class="s">)</span></code>
instead.</p>
</li>
<li>
<p>SVs of type <code class="inline"><span class="w">SVt_NV</span></code>
are now sometimes bodiless when the build
configuration and platform allow it: specifically, when <code class="inline"><span class="i">sizeof</span><span class="s">(</span><span class="w">NV</span><span class="s">)</span> <=
<span class="i">sizeof</span><span class="s">(</span><span class="w">IV</span><span class="s">)</span></code>
. "Bodiless" means that the NV value is stored directly in
the head of an SV, without requiring a separate body to be allocated. This
trick has already been used for IVs since 5.9.2 (though in the case of
IVs, it is always used, regardless of platform and build configuration).</p>
</li>
<li>
<p>The <code class="inline"><span class="i">$DB::single</span></code>
, <code class="inline"><span class="i">$DB::signal</span></code>
and <code class="inline"><span class="i">$DB::trace</span></code>
variables now have set- and
get-magic that stores their values as IVs, and those IVs are used when
testing their values in <code class="inline"><span class="i">pp_dbstate</span><span class="s">(</span><span class="s">)</span></code>
. This prevents perl from
recursing infinitely if an overloaded object is assigned to any of those
variables.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122445">[perl #122445]</a>.</p>
</li>
<li>
<p><code class="inline"><span class="i">Perl_tmps_grow</span><span class="s">(</span><span class="s">)</span></code>
, which is marked as public API but is undocumented, has
been removed from the public API. This change does not affect XS code that
uses the <code class="inline"><span class="w">EXTEND_MORTAL</span></code>
macro to pre-extend the mortal stack.</p>
</li>
<li>
<p>Perl's internals no longer sets or uses the <code class="inline"><span class="w">SVs_PADMY</span></code>
flag.
<code class="inline"><span class="i">SvPADMY</span><span class="s">(</span><span class="s">)</span></code>
now returns a true value for anything not marked <code class="inline"><span class="w">PADTMP</span></code>
and <code class="inline"><span class="w">SVs_PADMY</span></code>
is now defined as 0.</p>
</li>
<li>
<p>The macros <code class="inline"><span class="w">SETsv</span></code>
and <code class="inline"><span class="w">SETsvUN</span></code>
have been removed. They were no longer used
in the core since commit 6f1401dc2a five years ago, and have not been
found present on CPAN.</p>
</li>
<li>
<p>The <code class="inline"><span class="w">SvFAKE</span></code>
bit (unused on HVs) got informally reserved by
David Mitchell for future work on vtables.</p>
</li>
<li>
<p>The <code class="inline"><span class="i">sv_catpvn_flags</span><span class="s">(</span><span class="s">)</span></code>
function accepts <code class="inline"><span class="w">SV_CATBYTES</span></code>
and <code class="inline"><span class="w">SV_CATUTF8</span></code>
flags, which specify whether the appended string is bytes or UTF-8,
respectively. (These flags have in fact been present since 5.16.0, but
were formerly not regarded as part of the API.)</p>
</li>
<li>
<p>A new opcode class, <code class="inline"><span class="w">METHOP</span></code>
, has been introduced. It holds
information used at runtime to improve the performance
of class/object method calls.</p>
<p><code class="inline"><span class="w">OP_METHOD</span></code>
and <code class="inline"><span class="w">OP_METHOD_NAMED</span></code>
have changed from being
<code class="inline"><span class="w">UNOP</span>/<span class="w">SVOP</span></code>
to being <code class="inline"><span class="w">METHOP</span></code>
.</p>
</li>
<li>
<p><code class="inline"><span class="i">cv_name</span><span class="s">(</span><span class="s">)</span></code>
is a new API function that can be passed a CV or GV. It
returns an SV containing the name of the subroutine, for use in
diagnostics.</p>
<p><a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d116735">[perl #116735]</a>
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d120441">[perl #120441]</a></p>
</li>
<li>
<p><code class="inline"><span class="i">cv_set_call_checker_flags</span><span class="s">(</span><span class="s">)</span></code>
is a new API function that works like
<code class="inline"><span class="i">cv_set_call_checker</span><span class="s">(</span><span class="s">)</span></code>
, except that it allows the caller to specify
whether the call checker requires a full GV for reporting the subroutine's
name, or whether it could be passed a CV instead. Whatever value is
passed will be acceptable to <code class="inline"><span class="i">cv_name</span><span class="s">(</span><span class="s">)</span></code>
. <code class="inline"><span class="i">cv_set_call_checker</span><span class="s">(</span><span class="s">)</span></code>
guarantees there will be a GV, but it may have to create one on the fly,
which is inefficient.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d116735">[perl #116735]</a></p>
</li>
<li>
<p><code class="inline"><span class="w">CvGV</span></code>
(which is not part of the API) is now a more complex macro, which may
call a function and reify a GV. For those cases where it has been used as a
boolean, <code class="inline"><span class="w">CvHASGV</span></code>
has been added, which will return true for CVs that
notionally have GVs, but without reifying the GV. <code class="inline"><span class="w">CvGV</span></code>
also returns a GV
now for lexical subs.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d120441">[perl #120441]</a></p>
</li>
<li>
<p>The <a href="perlapi.html#sync_locale">sync_locale in perlapi</a> function has been added to the public API.
Changing the program's locale should be avoided by XS code. Nevertheless,
certain non-Perl libraries called from XS need to do so, such as <code class="inline"><span class="w">Gtk</span></code>
.
When this happens, Perl needs to be told that the locale has
changed. Use this function to do so, before returning to Perl.</p>
</li>
<li>
<p>The defines and labels for the flags in the <code class="inline"><span class="w">op_private</span></code>
field of OPs are now
auto-generated from data in <i>regen/op_private</i>. The noticeable effect of this
is that some of the flag output of <code class="inline"><span class="w">Concise</span></code>
might differ slightly, and the
flag output of <code class="inline"><span class="w">perl</span> -<span class="w">Dx</span></code>
may differ considerably (they both use the same set
of labels now). Also, debugging builds now have a new assertion in
<code class="inline"><span class="i">op_free</span><span class="s">(</span><span class="s">)</span></code>
to ensure that the op doesn't have any unrecognized flags set in
<code class="inline"><span class="w">op_private</span></code>
.</p>
</li>
<li>
<p>The deprecated variable <code class="inline"><span class="w">PL_sv_objcount</span></code>
has been removed.</p>
</li>
<li>
<p>Perl now tries to keep the locale category <code class="inline"><span class="w">LC_NUMERIC</span></code>
set to "C"
except around operations that need it to be set to the program's
underlying locale. This protects the many XS modules that cannot cope
with the decimal radix character not being a dot. Prior to this
release, Perl initialized this category to "C", but a call to
<code class="inline"><span class="i">POSIX::setlocale</span><span class="s">(</span><span class="s">)</span></code>
would change it. Now such a call will change the
underlying locale of the <code class="inline"><span class="w">LC_NUMERIC</span></code>
category for the program, but the
locale exposed to XS code will remain "C". There are new macros
to manipulate the LC_NUMERIC locale, including
<code class="inline"><span class="w">STORE_LC_NUMERIC_SET_TO_NEEDED</span></code>
and
<code class="inline"><span class="w">STORE_LC_NUMERIC_FORCE_TO_UNDERLYING</span></code>
.
See <a href="perlapi.html#Locale-related-functions-and-macros">Locale-related functions and macros in perlapi</a>.</p>
</li>
<li>
<p>A new macro <a href="perlapi.html#isUTF8_CHAR">isUTF8_CHAR </a> has been written which
efficiently determines if the string given by its parameters begins
with a well-formed UTF-8 encoded character.</p>
</li>
<li>
<p>The following private API functions had their context parameter removed:
<code class="inline"><span class="w">Perl_cast_ulong</span></code>
, <code class="inline"><span class="w">Perl_cast_i32</span></code>
, <code class="inline"><span class="w">Perl_cast_iv</span></code>
, <code class="inline"><span class="w">Perl_cast_uv</span></code>
,
<code class="inline"><span class="w">Perl_cv_const_sv</span></code>
, <code class="inline"><span class="w">Perl_mg_find</span></code>
, <code class="inline"><span class="w">Perl_mg_findext</span></code>
, <code class="inline"><span class="w">Perl_mg_magical</span></code>
,
<code class="inline"><span class="w">Perl_mini_mktime</span></code>
, <code class="inline"><span class="w">Perl_my_dirfd</span></code>
, <code class="inline"><span class="w">Perl_sv_backoff</span></code>
, <code class="inline"><span class="w">Perl_utf8_hop</span></code>
.</p>
<p>Note that the prefix-less versions of those functions that are part of the
public API, such as <code class="inline"><span class="i">cast_i32</span><span class="s">(</span><span class="s">)</span></code>
, remain unaffected.</p>
</li>
<li>
<p>The <code class="inline"><span class="w">PADNAME</span></code>
and <code class="inline"><span class="w">PADNAMELIST</span></code>
types are now separate types, and no
longer simply aliases for SV and AV.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123223">[perl #123223]</a>.</p>
</li>
<li>
<p>Pad names are now always UTF-8. The <code class="inline"><span class="w">PadnameUTF8</span></code>
macro always returns
true. Previously, this was effectively the case already, but any support
for two different internal representations of pad names has now been
removed.</p>
</li>
<li>
<p>A new op class, <code class="inline"><span class="w">UNOP_AUX</span></code>
, has been added. This is a subclass of
<code class="inline"><span class="w">UNOP</span></code>
with an <code class="inline"><span class="w">op_aux</span></code>
field added, which points to an array of unions
of UV, SV* etc. It is intended for where an op needs to store more data
than a simple <code class="inline"><span class="w">op_sv</span></code>
or whatever. Currently the only op of this type is
<code class="inline"><span class="w">OP_MULTIDEREF</span></code>
(see next item).</p>
</li>
<li>
<p>A new op has been added, <code class="inline"><span class="w">OP_MULTIDEREF</span></code>
, which performs one or more
nested array and hash lookups where the key is a constant or simple
variable. For example the expression <code class="inline"><span class="i">$a</span>[<span class="n">0</span>]{<span class="i">$k</span>}[<span class="i">$i</span>]</code>
, which previously
involved ten <code class="inline"><span class="w">rv2Xv</span></code>
, <code class="inline"><span class="w">Xelem</span></code>
, <code class="inline"><span class="w">gvsv</span></code>
and <code class="inline"><span class="w">const</span></code>
ops is now performed
by a single <code class="inline"><span class="w">multideref</span></code>
op. It can also handle <code class="inline"><a class="l_k" href="functions/local.html">local</a></code>, <code class="inline"><a class="l_k" href="functions/exists.html">exists</a></code> and
<code class="inline"><a class="l_k" href="functions/delete.html">delete</a></code>. A non-simple index expression, such as <code class="inline"><span class="s">[</span><span class="i">$i</span>+<span class="n">1</span><span class="s">]</span></code>
is still done
using <code class="inline"><span class="w">aelem</span></code>
/<code class="inline"><span class="w">helem</span></code>
, and single-level array lookup with a small constant
index is still done using <code class="inline"><span class="w">aelemfast</span></code>
.</p>
</li>
</ul>
<a name="Selected-Bug-Fixes"></a><h1>Selected Bug Fixes</h1>
<ul>
<li>
<p><code class="inline"><a class="l_k" href="functions/close.html">close</a></code> now sets <code class="inline"><span class="i">$!</span></code>
</p>
<p>When an I/O error occurs, the fact that there has been an error is recorded
in the handle. <code class="inline"><a class="l_k" href="functions/close.html">close</a></code> returns false for such a handle. Previously, the
value of <code class="inline"><span class="i">$!</span></code>
would be untouched by <code class="inline"><a class="l_k" href="functions/close.html">close</a></code>, so the common convention of
writing <code class="inline"><a class="l_k" href="functions/close.html">close</a> <span class="i">$fh</span> <a class="l_k" href="functions/or.html">or</a> <a class="l_k" href="functions/die.html">die</a> <span class="i">$!</span></code>
did not work reliably. Now the handle
records the value of <code class="inline"><span class="i">$!</span></code>
, too, and <code class="inline"><a class="l_k" href="functions/close.html">close</a></code> restores it.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/no.html">no</a> <span class="w">re</span></code>
now can turn off everything that <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">re</span></code>
enables</p>
<p>Previously, running <code class="inline"><a class="l_k" href="functions/no.html">no</a> <span class="w">re</span></code>
would turn off only a few things. Now it
can turn off all the enabled things. For example, the only way to
stop debugging, once enabled, was to exit the enclosing block; that is
now fixed.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/pack.html">pack</a><span class="s">(</span><span class="q">"D"</span><span class="cm">,</span> <span class="i">$x</span><span class="s">)</span></code>
and <code class="inline"><a class="l_k" href="functions/pack.html">pack</a><span class="s">(</span><span class="q">"F"</span><span class="cm">,</span> <span class="i">$x</span><span class="s">)</span></code>
now zero the padding on x86 long
double builds. Under some build options on GCC 4.8 and later, they used
to either overwrite the zero-initialized padding, or bypass the
initialized buffer entirely. This caused <i>op/pack.t</i> to fail.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123971">[perl #123971]</a></p>
</li>
<li>
<p>Extending an array cloned from a parent thread could result in "Modification of
a read-only value attempted" errors when attempting to modify the new elements.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d124127">[perl #124127]</a></p>
</li>
<li>
<p>An assertion failure and subsequent crash with <code class="inline"><span class="i">*x</span>=<span class="q"><y></span></code>
has been fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123790">[perl #123790]</a></p>
</li>
<li>
<p>A possible crashing/looping bug related to compiling lexical subs has been
fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d124099">[perl #124099]</a></p>
</li>
<li>
<p>UTF-8 now works correctly in function names, in unquoted HERE-document
terminators, and in variable names used as array indexes.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d124113">[perl #124113]</a></p>
</li>
<li>
<p>Repeated global pattern matches in scalar context on large tainted strings were
exponentially slow depending on the current match position in the string.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123202">[perl #123202]</a></p>
</li>
<li>
<p>Various crashes due to the parser getting confused by syntax errors have been
fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123801">[perl #123801]</a>
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123802">[perl #123802]</a>
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123955">[perl #123955]</a>
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123995">[perl #123995]</a></p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/split.html">split</a></code> in the scope of lexical <code class="inline"><span class="i">$_</span></code>
has been fixed not to fail assertions.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123763">[perl #123763]</a></p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/my.html">my</a> <span class="i">$x</span> <span class="co">:</span> <span class="w">attr</span></code>
syntax inside various list operators no longer fails
assertions.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123817">[perl #123817]</a></p>
</li>
<li>
<p>An <code class="inline"><span class="i">@</span></code>
sign in quotes followed by a non-ASCII digit (which is not a valid
identifier) would cause the parser to crash, instead of simply trying the
<code class="inline"><span class="i">@</span></code>
as literal. This has been fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123963">[perl #123963]</a></p>
</li>
<li>
<p><code class="inline"><span class="i">*bar::</span>=<span class="i">*foo::</span>=<span class="i">*glob_with_hash</span></code>
has been crashing since Perl 5.14, but no
longer does.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123847">[perl #123847]</a></p>
</li>
<li>
<p><code class="inline">foreach</code>
in scalar context was not pushing an item on to the stack, resulting
in bugs. (<code class="inline"><a class="l_k" href="functions/print.html">print</a> <span class="n">4</span><span class="cm">,</span> <a class="l_k" href="functions/scalar.html">scalar</a> <a class="l_k" href="functions/do.html">do</a> <span class="s">{</span> <a class="l_k" href="functions/foreach.html">foreach</a><span class="s">(</span><span class="i">@x</span><span class="s">)</span><span class="s">{</span><span class="s">}</span> <span class="s">}</span> + <span class="n">1</span></code>
would print 5.)
It has been fixed to return <code class="inline"><a class="l_k" href="functions/undef.html">undef</a></code>.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d124004">[perl #124004]</a></p>
</li>
<li>
<p>Several cases of data used to store environment variable contents in core C
code being potentially overwritten before being used have been fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123748">[perl #123748]</a></p>
</li>
<li>
<p>Some patterns starting with <code class="inline"><span class="q">/.*..../</span></code>
matched against long strings have
been slow since v5.8, and some of the form <code class="inline"><span class="q">/.*..../i</span></code>
have been slow
since v5.18. They are now all fast again.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123743">[perl #123743]</a>.</p>
</li>
<li>
<p>The original visible value of <code class="inline"><span class="i">$/</span></code>
is now preserved when it is set to
an invalid value. Previously if you set <code class="inline"><span class="i">$/</span></code>
to a reference to an
array, for example, perl would produce a runtime error and not set
<code class="inline"><span class="w">PL_rs</span></code>
, but Perl code that checked <code class="inline"><span class="i">$/</span></code>
would see the array
reference.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123218">[perl #123218]</a>.</p>
</li>
<li>
<p>In a regular expression pattern, a POSIX class, like <code class="inline"><span class="s">[</span><span class="co">:</span><span class="w">ascii</span><span class="co">:</span><span class="s">]</span></code>
, must
be inside a bracketed character class, like <code class="inline"><a class="l_k" href="functions/qr.html">qr/[[:ascii:]]/</a></code>. A
warning is issued when something looking like a POSIX class is not
inside a bracketed class. That warning wasn't getting generated when
the POSIX class was negated: <code class="inline"><span class="s">[</span><span class="co">:</span>^<span class="w">ascii</span><span class="co">:</span><span class="s">]</span></code>
. This is now fixed.</p>
</li>
<li>
<p>Perl 5.14.0 introduced a bug whereby <code class="inline"><a class="l_k" href="functions/eval.html">eval</a> <span class="s">{</span> <span class="j">LABEL:</span> <span class="s">}</span></code>
would crash. This
has been fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123652">[perl #123652]</a>.</p>
</li>
<li>
<p>Various crashes due to the parser getting confused by syntax errors have
been fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123617">[perl #123617]</a>.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123737">[perl #123737]</a>.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123753">[perl #123753]</a>.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123677">[perl #123677]</a>.</p>
</li>
<li>
<p>Code like <code class="inline"><span class="q">/$a[/</span></code>
used to read the next line of input and treat it as
though it came immediately after the opening bracket. Some invalid code
consequently would parse and run, but some code caused crashes, so this is
now disallowed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123712">[perl #123712]</a>.</p>
</li>
<li>
<p>Fix argument underflow for <code class="inline"><a class="l_k" href="functions/pack.html">pack</a></code>.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123874">[perl #123874]</a>.</p>
</li>
<li>
<p>Fix handling of non-strict <code class="inline">\<span class="w">x</span><span class="s">{</span><span class="s">}</span></code>
. Now <code class="inline">\<span class="w">x</span><span class="s">{</span><span class="s">}</span></code>
is equivalent to <code class="inline">\<span class="i">x</span><span class="s">{</span><span class="n">0</span><span class="s">}</span></code>
instead of faulting.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/stat.html">stat</a> -t</code>
is now no longer treated as stackable, just like <code class="inline">-t <a class="l_k" href="functions/stat.html">stat</a></code>
.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123816">[perl #123816]</a>.</p>
</li>
<li>
<p>The following no longer causes a SEGV: <code class="inline"><a class="l_k" href="functions/qr.html">qr{x+(y(?0))*}</a></code>.</p>
</li>
<li>
<p>Fixed infinite loop in parsing backrefs in regexp patterns.</p>
</li>
<li>
<p>Several minor bug fixes in behavior of Infinity and NaN, including
warnings when stringifying Infinity-like or NaN-like strings. For example,
"NaNcy" doesn't numify to NaN anymore.</p>
</li>
<li>
<p>A bug in regular expression patterns that could lead to segfaults and
other crashes has been fixed. This occurred only in patterns compiled
with <code class="inline">/i</code> while taking into account the current POSIX locale (which usually
means they have to be compiled within the scope of <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">locale</span></code>
),
and there must be a string of at least 128 consecutive bytes to match.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123539">[perl #123539]</a>.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/s.html">s///g</a></code> now works on very long strings (where there are more than 2
billion iterations) instead of dying with 'Substitution loop'.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d103260">[perl #103260]</a>.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123071">[perl #123071]</a>.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/gmtime.html">gmtime</a></code> no longer crashes with not-a-number values.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123495">[perl #123495]</a>.</p>
</li>
<li>
<p><code class="inline">\<span class="s">(</span><span class="s">)</span></code>
(a reference to an empty list), and <code class="inline"><a class="l_k" href="functions/y.html">y///</a></code> with lexical <code class="inline"><span class="i">$_</span></code>
in
scope, could both do a bad write past the end of the stack. They have
both been fixed to extend the stack first.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/prototype.html">prototype()</a></code> with no arguments used to read the previous item on the
stack, so <code class="inline"><a class="l_k" href="functions/print.html">print</a> <span class="q">"foo"</span><span class="cm">,</span> <a class="l_k" href="functions/prototype.html">prototype</a><span class="s">(</span><span class="s">)</span></code>
would print foo's prototype.
It has been fixed to infer <code class="inline"><span class="i">$_</span></code>
instead.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123514">[perl #123514]</a>.</p>
</li>
<li>
<p>Some cases of lexical state subs declared inside predeclared subs could
crash, for example when evalling a string including the name of an outer
variable, but no longer do.</p>
</li>
<li>
<p>Some cases of nested lexical state subs inside anonymous subs could cause
'Bizarre copy' errors or possibly even crashes.</p>
</li>
<li>
<p>When trying to emit warnings, perl's default debugger (<i>perl5db.pl</i>) was
sometimes giving 'Undefined subroutine &DB::db_warn called' instead. This
bug, which started to occur in Perl 5.18, has been fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123553">[perl #123553]</a>.</p>
</li>
<li>
<p>Certain syntax errors in substitutions, such as <code class="inline"><a class="l_k" href="functions/s.html">s/${<>{})//</a></code>, would
crash, and had done so since Perl 5.10. (In some cases the crash did not
start happening till 5.16.) The crash has, of course, been fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123542">[perl #123542]</a>.</p>
</li>
<li>
<p>Fix a couple of string grow size calculation overflows; in particular,
a repeat expression like <code class="inline"><span class="n">33</span> x ~<span class="n">3</span></code>
could cause a large buffer
overflow since the new output buffer size was not correctly handled by
<code class="inline"><span class="i">SvGROW</span><span class="s">(</span><span class="s">)</span></code>
. An expression like this now properly produces a memory wrap
panic.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123554">[perl #123554]</a>.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/formline.html">formline</a><span class="s">(</span><span class="q">"@..."</span><span class="cm">,</span> <span class="q">"a"</span><span class="s">)</span><span class="sc">;</span></code>
would crash. The <code class="inline"><span class="w">FF_CHECKNL</span></code>
case in
<code class="inline"><span class="i">pp_formline</span><span class="s">(</span><span class="s">)</span></code>
didn't set the pointer used to mark the chop position,
which led to the <code class="inline"><span class="w">FF_MORE</span></code>
case crashing with a segmentation fault.
This has been fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123538">[perl #123538]</a>.</p>
</li>
<li>
<p>A possible buffer overrun and crash when parsing a literal pattern during
regular expression compilation has been fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123604">[perl #123604]</a>.</p>
</li>
<li>
<p><code class="inline"><span class="i">fchmod</span><span class="s">(</span><span class="s">)</span></code>
and <code class="inline"><span class="i">futimes</span><span class="s">(</span><span class="s">)</span></code>
now set <code class="inline"><span class="i">$!</span></code>
when they fail due to being
passed a closed file handle.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122703">[perl #122703]</a>.</p>
</li>
<li>
<p><code class="inline"><span class="i">op_free</span><span class="s">(</span><span class="s">)</span></code>
and <code class="inline"><span class="i">scalarvoid</span><span class="s">(</span><span class="s">)</span></code>
no longer crash due to a stack overflow
when freeing a deeply recursive op tree.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d108276">[perl #108276]</a>.</p>
</li>
<li>
<p>In Perl 5.20.0, <code class="inline"><span class="i">$^N</span></code>
accidentally had the internal UTF-8 flag turned off
if accessed from a code block within a regular expression, effectively
UTF-8-encoding the value. This has been fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123135">[perl #123135]</a>.</p>
</li>
<li>
<p>A failed <code class="inline"><a class="l_k" href="functions/semctl.html">semctl</a></code> call no longer overwrites existing items on the stack,
which means that <code class="inline"><span class="s">(</span><a class="l_k" href="functions/semctl.html">semctl</a><span class="s">(</span><span class="n">-1</span><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">0</span><span class="s">)</span><span class="s">)</span>[<span class="n">0</span>]</code>
no longer gives an
"uninitialized" warning.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/else.html">else{foo()}</a></code> with no space before <code class="inline"><span class="w">foo</span></code>
is now better at assigning the
right line number to that statement.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122695">[perl #122695]</a>.</p>
</li>
<li>
<p>Sometimes the assignment in <code class="inline"><span class="i">@array</span> = <a class="l_k" href="functions/split.html">split</a></code>
gets optimised so that <code class="inline"><a class="l_k" href="functions/split.html">split</a></code>
itself writes directly to the array. This caused a bug, preventing this
assignment from being used in lvalue context. So
<code class="inline"><span class="s">(</span><span class="i">@a</span>=<a class="l_k" href="functions/split.html">split</a><span class="q">//</span><span class="cm">,</span><span class="q">"foo"</span><span class="s">)</span>=<span class="i">bar</span><span class="s">(</span><span class="s">)</span></code>
was an error. (This bug probably goes back to
Perl 3, when the optimisation was added.) It has now been fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123057">[perl #123057]</a>.</p>
</li>
<li>
<p>When an argument list fails the checks specified by a subroutine
signature (which is still an experimental feature), the resulting error
messages now give the file and line number of the caller, not of the
called subroutine.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121374">[perl #121374]</a>.</p>
</li>
<li>
<p>The flip-flop operators (<code class="inline">..</code>
and <code class="inline">...</code>
in scalar context) used to maintain
a separate state for each recursion level (the number of times the
enclosing sub was called recursively), contrary to the documentation. Now
each closure has one internal state for each flip-flop.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122829">[perl #122829]</a>.</p>
</li>
<li>
<p>The flip-flop operator (<code class="inline">..</code>
in scalar context) would return the same
scalar each time, unless the containing subroutine was called recursively.
Now it always returns a new scalar.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122829">[perl #122829]</a>.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/use.html">use</a></code>, <code class="inline"><a class="l_k" href="functions/no.html">no</a></code>, statement labels, special blocks (<code class="inline">BEGIN</code>
) and pod are now
permitted as the first thing in a <code class="inline"><a class="l_k" href="functions/map.html">map</a></code> or <code class="inline"><a class="l_k" href="functions/grep.html">grep</a></code> block, the block after
<code class="inline"><a class="l_k" href="functions/print.html">print</a></code> or <code class="inline"><a class="l_k" href="functions/say.html">say</a></code> (or other functions) returning a handle, and within
<code class="inline"><span class="i">$</span>{...}</code>
, <code class="inline"><span class="i">@</span>{...}</code>
, etc.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122782">[perl #122782]</a>.</p>
</li>
<li>
<p>The repetition operator <code class="inline"><span class="w">x</span></code>
now propagates lvalue context to its left-hand
argument when used in contexts like <code class="inline">foreach</code>
. That allows
<code class="inline"><a class="l_k" href="functions/for.html">for</a><span class="s">(</span><span class="s">(</span><span class="i">$#that_array</span><span class="s">)</span><span class="n">x2</span><span class="s">)</span> <span class="s">{</span> ... <span class="s">}</span></code>
to work as expected if the loop modifies
<code class="inline"><span class="i">$_</span></code>
.</p>
</li>
<li>
<p><code class="inline"><span class="s">(</span>...<span class="s">)</span> x ...</code>
in scalar context used to corrupt the stack if one operand
was an object with "x" overloading, causing erratic behavior.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121827">[perl #121827]</a>.</p>
</li>
<li>
<p>Assignment to a lexical scalar is often optimised away; for example in
<code class="inline"><a class="l_k" href="functions/my.html">my</a> <span class="i">$x</span><span class="sc">;</span> <span class="i">$x</span> = <span class="i">$y</span> + <span class="i">$z</span></code>
, the assign operator is optimised away and the add
operator writes its result directly to <code class="inline"><span class="i">$x</span></code>
. Various bugs related to
this optimisation have been fixed. Certain operators on the right-hand
side would sometimes fail to assign the value at all or assign the wrong
value, or would call STORE twice or not at all on tied variables. The
operators affected were <code class="inline"><span class="i">$foo</span>++</code>
, <code class="inline"><span class="i">$foo</span>--</code>
, and <code class="inline">-<span class="i">$foo</span></code>
under <code class="inline"><a class="l_k" href="functions/use.html">use</a>
<span class="w">integer</span></code>
, <code class="inline"><a class="l_k" href="functions/chomp.html">chomp</a></code>, <code class="inline"><a class="l_k" href="functions/chr.html">chr</a></code> and <code class="inline"><a class="l_k" href="functions/setpgrp.html">setpgrp</a></code>.</p>
</li>
<li>
<p>List assignments were sometimes buggy if the same scalar ended up on both
sides of the assignment due to use of <code class="inline"><a class="l_k" href="functions/tied.html">tied</a></code>, <code class="inline"><a class="l_k" href="functions/values.html">values</a></code> or <code class="inline"><a class="l_k" href="functions/each.html">each</a></code>. The
result would be the wrong value getting assigned.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/setpgrp.html">setpgrp($nonzero)</a></code> (with one argument) was accidentally changed in 5.16
to mean <code class="inline"><a class="l_k" href="functions/setpgrp.html">setpgrp(0)</a></code>. This has been fixed.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/__SUB__.html">__SUB__</a></code> could return the wrong value or even corrupt memory under the
debugger (the <code class="inline">-d</code>
switch) and in subs containing <code class="inline"><a class="l_k" href="functions/eval.html">eval</a> <span class="i">$string</span></code>
.</p>
</li>
<li>
<p>When <code class="inline"><span class="i">sub ()</span> <span class="s">{</span> <span class="i">$var</span> <span class="s">}</span></code>
becomes inlinable, it now returns a different
scalar each time, just as a non-inlinable sub would, though Perl still
optimises the copy away in cases where it would make no observable
difference.</p>
</li>
<li>
<p><code class="inline"><a name="f"></a><a class="l_k" href="functions/my.html">my</a> sub <span class="m">f ()</span> <span class="s">{</span> <span class="i">$var</span> <span class="s">}</span></code>
and <code class="inline"><span class="i">sub ()</span> <span class="co">:</span> <span class="w">attr</span> <span class="s">{</span> <span class="i">$var</span> <span class="s">}</span></code>
are no longer
eligible for inlining. The former would crash; the latter would just
throw the attributes away. An exception is made for the little-known
<code class="inline"><span class="j">:</span><span class="w">method</span></code>
attribute, which does nothing much.</p>
</li>
<li>
<p>Inlining of subs with an empty prototype is now more consistent than
before. Previously, a sub with multiple statements, of which all but the last
were optimised away, would be inlinable only if it were an anonymous sub
containing a string <code class="inline"><a class="l_k" href="functions/eval.html">eval</a></code> or <code class="inline"><a class="l_k" href="functions/state.html">state</a></code> declaration or closing over an
outer lexical variable (or any anonymous sub under the debugger). Now any
sub that gets folded to a single constant after statements have been
optimised away is eligible for inlining. This applies to things like <code class="inline"><a class="l_k" href="functions/sub.html">sub</a>
<span class="i">()</span> <span class="s">{</span> <span class="i">jabber</span><span class="s">(</span><span class="s">)</span> <a class="l_k" href="functions/if.html">if</a> <span class="w">DEBUG</span><span class="sc">;</span> <span class="n">42</span> <span class="s">}</span></code>
.</p>
<p>Some subroutines with an explicit <code class="inline"><a class="l_k" href="functions/return.html">return</a></code> were being made inlinable,
contrary to the documentation, Now <code class="inline"><a class="l_k" href="functions/return.html">return</a></code> always prevents inlining.</p>
</li>
<li>
<p>On some systems, such as VMS, <code class="inline"><a class="l_k" href="functions/crypt.html">crypt</a></code> can return a non-ASCII string. If a
scalar assigned to had contained a UTF-8 string previously, then <code class="inline"><a class="l_k" href="functions/crypt.html">crypt</a></code>
would not turn off the UTF-8 flag, thus corrupting the return value. This
would happen with <code class="inline"><span class="i">$lexical</span> = <a class="l_k" href="functions/crypt.html">crypt</a> ...</code>
.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/crypt.html">crypt</a></code> no longer calls <code class="inline"><span class="w">FETCH</span></code>
twice on a tied first argument.</p>
</li>
<li>
<p>An unterminated here-doc on the last line of a quote-like operator
(<code class="inline"><span class="q">qq[${ <<END }]</span></code>
, <code class="inline"><span class="q">/(?{ <<END })/</span></code>
) no longer causes a double free. It
started doing so in 5.18.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/index.html">index()</a></code> and <code class="inline"><a class="l_k" href="functions/rindex.html">rindex()</a></code> no longer crash when used on strings over 2GB in
size.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121562">[perl #121562]</a>.</p>
</li>
<li>
<p>A small, previously intentional, memory leak in
<code class="inline"><span class="w">PERL_SYS_INIT</span></code>
/<code class="inline"><span class="w">PERL_SYS_INIT3</span></code>
on Win32 builds was fixed. This might
affect embedders who repeatedly create and destroy perl engines within
the same process.</p>
</li>
<li>
<p><code class="inline"><span class="i">POSIX::localeconv</span><span class="s">(</span><span class="s">)</span></code>
now returns the data for the program's underlying
locale even when called from outside the scope of <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">locale</span></code>
.</p>
</li>
<li>
<p><code class="inline"><span class="i">POSIX::localeconv</span><span class="s">(</span><span class="s">)</span></code>
now works properly on platforms which don't have
<code class="inline"><span class="w">LC_NUMERIC</span></code>
and/or <code class="inline"><span class="w">LC_MONETARY</span></code>
, or for which Perl has been compiled
to disregard either or both of these locale categories. In such
circumstances, there are now no entries for the corresponding values in
the hash returned by <code class="inline"><span class="i">localeconv</span><span class="s">(</span><span class="s">)</span></code>
.</p>
</li>
<li>
<p><code class="inline"><span class="i">POSIX::localeconv</span><span class="s">(</span><span class="s">)</span></code>
now marks appropriately the values it returns as
UTF-8 or not. Previously they were always returned as bytes, even if
they were supposed to be encoded as UTF-8.</p>
</li>
<li>
<p>On Microsoft Windows, within the scope of <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">locale</span></code>
, the following
POSIX character classes gave results for many locales that did not
conform to the POSIX standard:
<code class="inline"><span class="s">[</span><span class="s">[</span><span class="co">:</span><span class="w">alnum</span><span class="co">:</span><span class="s">]</span><span class="s">]</span></code>
,
<code class="inline"><span class="s">[</span><span class="s">[</span><span class="co">:</span><span class="w">alpha</span><span class="co">:</span><span class="s">]</span><span class="s">]</span></code>
,
<code class="inline">[[:blank:]]</code>,
<code class="inline"><span class="s">[</span><span class="s">[</span><span class="co">:</span><span class="w">digit</span><span class="co">:</span><span class="s">]</span><span class="s">]</span></code>
,
<code class="inline"><span class="s">[</span><span class="s">[</span><span class="co">:</span><span class="w">graph</span><span class="co">:</span><span class="s">]</span><span class="s">]</span></code>
,
<code class="inline">[[:lower:]]</code>,
<code class="inline">[[:print:]]</code>,
<code class="inline">[[:punct:]]</code>,
<code class="inline"><span class="s">[</span><span class="s">[</span><span class="co">:</span><span class="w">upper</span><span class="co">:</span><span class="s">]</span><span class="s">]</span></code>
,
<code class="inline"><span class="s">[</span><span class="s">[</span><span class="co">:</span><span class="w">word</span><span class="co">:</span><span class="s">]</span><span class="s">]</span></code>
,
and
<code class="inline"><span class="s">[</span><span class="s">[</span><span class="co">:</span><span class="w">xdigit</span><span class="co">:</span><span class="s">]</span><span class="s">]</span></code>
.
This was because the underlying Microsoft implementation does not
follow the standard. Perl now takes special precautions to correct for
this.</p>
</li>
<li>
<p>Many issues have been detected by <a href="http://search.cpan.org/perldoc/http:#%2fwww.coverity.com%2f">Coverity</a> and
fixed.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/system.html">system()</a></code> and friends should now work properly on more Android builds.</p>
<p>Due to an oversight, the value specified through <code class="inline">-<span class="w">Dtargetsh</span></code>
to <i>Configure</i>
would end up being ignored by some of the build process. This caused perls
cross-compiled for Android to end up with defective versions of <code class="inline"><a class="l_k" href="functions/system.html">system()</a></code>,
<code class="inline"><a class="l_k" href="functions/exec.html">exec()</a></code> and backticks: the commands would end up looking for <code class="inline">/bin/sh</code>
instead of <code class="inline"><span class="q">/system/</span><span class="w">bin</span>/<span class="w">sh</span></code>
, and so would fail for the vast majority
of devices, leaving <code class="inline"><span class="i">$!</span></code>
as <code class="inline"><span class="w">ENOENT</span></code>
.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/qr.html">qr(...\(...\)...)</a></code>,
<code class="inline"><a class="l_k" href="functions/qr.html">qr[...\[...\]...]</a></code>,
and
<code class="inline"><a class="l_k" href="functions/qr.html">qr{...\{...\}...}</a></code>
now work. Previously it was impossible to escape these three
left-characters with a backslash within a regular expression pattern
where otherwise they would be considered metacharacters, and the pattern
opening delimiter was the character, and the closing delimiter was its
mirror character.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/s.html">s///e</a></code> on tainted UTF-8 strings corrupted <code class="inline"><a class="l_k" href="functions/pos.html">pos()</a></code>. This bug,
introduced in 5.20, is now fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122148">[perl #122148]</a>.</p>
</li>
<li>
<p>A non-word boundary in a regular expression (<code class="inline">\<span class="w">B</span></code>
) did not always
match the end of the string; in particular <code class="inline"><span class="q">q{}</span> =~ <span class="q">/\B/</span></code>
did not
match. This bug, introduced in perl 5.14, is now fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122090">[perl #122090]</a>.</p>
</li>
<li>
<p><code class="inline"><span class="q">" P"</span> =~ <span class="q">/(?=.*P)P/</span></code>
should match, but did not. This is now fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122171">[perl #122171]</a>.</p>
</li>
<li>
<p>Failing to compile <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">Foo</span></code>
in an <code class="inline"><a class="l_k" href="functions/eval.html">eval</a></code> could leave a spurious
<code class="inline">BEGIN</code>
subroutine definition, which would produce a "Subroutine
BEGIN redefined" warning on the next use of <code class="inline"><a class="l_k" href="functions/use.html">use</a></code>, or other <code class="inline">BEGIN</code>
block.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122107">[perl #122107]</a>.</p>
</li>
<li>
<p><code class="inline"><span class="i">method</span> <span class="s">{</span> <span class="w">BLOCK</span> <span class="s">}</span> <span class="w">ARGS</span></code>
syntax now correctly parses the arguments if they
begin with an opening brace.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d46947">[perl #46947]</a>.</p>
</li>
<li>
<p>External libraries and Perl may have different ideas of what the locale is.
This is problematic when parsing version strings if the locale's numeric
separator has been changed. Version parsing has been patched to ensure
it handles the locales correctly.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121930">[perl #121930]</a>.</p>
</li>
<li>
<p>A bug has been fixed where zero-length assertions and code blocks inside of a
regex could cause <code class="inline"><a class="l_k" href="functions/pos.html">pos</a></code> to see an incorrect value.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122460">[perl #122460]</a>.</p>
</li>
<li>
<p>Dereferencing of constants now works correctly for typeglob constants. Previously
the glob was stringified and its name looked up. Now the glob itself is used.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d69456">[perl #69456]</a></p>
</li>
<li>
<p>When parsing a sigil (<code class="inline"><span class="i">$</span></code>
<code class="inline"><span class="i">@</span></code>
<code class="inline"><span class="i">%</span></code>
<code class="inline"><span class="i">&)</span></code>
followed by braces,
the parser no
longer tries to guess whether it is a block or a hash constructor (causing a
syntax error when it guesses the latter), since it can only be a block.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/undef.html">undef</a> <span class="i">$reference</span></code>
now frees the referent immediately, instead of hanging on
to it until the next statement.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122556">[perl #122556]</a></p>
</li>
<li>
<p>Various cases where the name of a sub is used (autoload, overloading, error
messages) used to crash for lexical subs, but have been fixed.</p>
</li>
<li>
<p>Bareword lookup now tries to avoid vivifying packages if it turns out the
bareword is not going to be a subroutine name.</p>
</li>
<li>
<p>Compilation of anonymous constants (<i>e.g.</i>, <code class="inline"><span class="i">sub ()</span> <span class="s">{</span> <span class="n">3</span> <span class="s">}</span></code>
) no longer deletes
any subroutine named <code class="inline"><span class="w">__ANON__</span></code>
in the current package. Not only was
<code class="inline"><span class="i">*__ANON__</span>{<span class="w">CODE</span>}</code>
cleared, but there was a memory leak, too. This bug goes
back to Perl 5.8.0.</p>
</li>
<li>
<p>Stub declarations like <code class="inline">sub <span class="m">f</span><span class="sc">;</span></code>
and <code class="inline">sub <span class="m">f ()</span><span class="sc">;</span></code>
no longer wipe out constants
of the same name declared by <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">constant</span></code>
. This bug was introduced in Perl
5.10.0.</p>
</li>
<li>
<p><code class="inline"><span class="q">qr/[\N{named sequence}]/</span></code>
now works properly in many instances.</p>
<p>Some names
known to <code class="inline">\<span class="i">N</span><span class="s">{</span>...<span class="s">}</span></code>
refer to a sequence of multiple characters, instead of the
usual single character. Bracketed character classes generally only match
single characters, but now special handling has been added so that they can
match named sequences, but not if the class is inverted or the sequence is
specified as the beginning or end of a range. In these cases, the only
behavior change from before is a slight rewording of the fatal error message
given when this class is part of a <code class="inline"><span class="q">?[...])</span></code>
construct. When the <code class="inline"><span class="s">[</span>...<span class="s">]</span></code>
stands alone, the same non-fatal warning as before is raised, and only the
first character in the sequence is used, again just as before.</p>
</li>
<li>
<p>Tainted constants evaluated at compile time no longer cause unrelated
statements to become tainted.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122669">[perl #122669]</a></p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/open.html">open</a> <span class="i">$$fh</span><span class="cm">,</span> ...</code>
, which vivifies a handle with a name like
<code class="inline"><span class="q">"main::_GEN_0"</span></code>
, was not giving the handle the right reference count, so
a double free could happen.</p>
</li>
<li>
<p>When deciding that a bareword was a method name, the parser would get confused
if an <code class="inline"><a class="l_k" href="functions/our.html">our</a></code> sub with the same name existed, and look up the method in the
package of the <code class="inline"><a class="l_k" href="functions/our.html">our</a></code> sub, instead of the package of the invocant.</p>
</li>
<li>
<p>The parser no longer gets confused by <code class="inline">\<span class="w">U</span>=</code>
within a double-quoted string. It
used to produce a syntax error, but now compiles it correctly.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d80368">[perl #80368]</a></p>
</li>
<li>
<p>It has always been the intention for the <code class="inline">-B</code>
and <code class="inline">-T</code>
file test operators to
treat UTF-8 encoded files as text. (<a href="functions/-X.html">-X FILEHANDLE</a> has
been updated to say this.) Previously, it was possible for some files to be
considered UTF-8 that actually weren't valid UTF-8. This is now fixed. The
operators now work on EBCDIC platforms as well.</p>
</li>
<li>
<p>Under some conditions warning messages raised during regular expression pattern
compilation were being output more than once. This has now been fixed.</p>
</li>
<li>
<p>Perl 5.20.0 introduced a regression in which a UTF-8 encoded regular
expression pattern that contains a single ASCII lowercase letter did not
match its uppercase counterpart. That has been fixed in both 5.20.1 and
5.22.0.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122655">[perl #122655]</a></p>
</li>
<li>
<p>Constant folding could incorrectly suppress warnings if lexical warnings
(<code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">warnings</span></code>
or <code class="inline"><a class="l_k" href="functions/no.html">no</a> <span class="w">warnings</span></code>
) were not in effect and <code class="inline"><span class="i">$^W</span></code>
were
false at compile time and true at run time.</p>
</li>
<li>
<p>Loading Unicode tables during a regular expression match could cause assertion
failures under debugging builds if the previous match used the very same
regular expression.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122747">[perl #122747]</a></p>
</li>
<li>
<p>Thread cloning used to work incorrectly for lexical subs, possibly causing
crashes or double frees on exit.</p>
</li>
<li>
<p>Since Perl 5.14.0, deleting <code class="inline"><span class="i">$SomePackage::</span>{<span class="w">__ANON__</span>}</code>
and then undefining an
anonymous subroutine could corrupt things internally, resulting in
<a href="Devel/Peek.html">Devel::Peek</a> crashing or <a href="B.html">B.pm</a> giving nonsensical data. This has been
fixed.</p>
</li>
<li>
<p><code class="inline"><span class="s">(</span><a class="l_k" href="functions/caller.html">caller</a> <span class="i">$n</span><span class="s">)</span>[<span class="n">3</span>]</code>
now reports names of lexical subs, instead of
treating them as <code class="inline"><span class="q">"(unknown)"</span></code>
.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/sort.html">sort</a> <span class="i">subname</span> <span class="w">LIST</span></code>
now supports using a lexical sub as the comparison
routine.</p>
</li>
<li>
<p>Aliasing (<i>e.g.</i>, via <code class="inline"><span class="i">*x</span> = <span class="i">*y</span></code>
) could confuse list assignments that mention the
two names for the same variable on either side, causing wrong values to be
assigned.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d15667">[perl #15667]</a></p>
</li>
<li>
<p>Long here-doc terminators could cause a bad read on short lines of input. This
has been fixed. It is doubtful that any crash could have occurred. This bug
goes back to when here-docs were introduced in Perl 3.000 twenty-five years
ago.</p>
</li>
<li>
<p>An optimization in <code class="inline"><a class="l_k" href="functions/split.html">split</a></code> to treat <code class="inline"><a class="l_k" href="functions/split.html">split</a> <span class="q">/^/</span></code>
like <code class="inline"><a class="l_k" href="functions/split.html">split</a> <span class="q">/^/m</span></code>
had the
unfortunate side-effect of also treating <code class="inline"><a class="l_k" href="functions/split.html">split</a> <span class="q">/\A/</span></code>
like <code class="inline"><a class="l_k" href="functions/split.html">split</a> <span class="q">/^/m</span></code>
,
which it should not. This has been fixed. (Note, however, that <code class="inline"><a class="l_k" href="functions/split.html">split</a> <span class="q">/^x/</span></code>
does not behave like <code class="inline"><a class="l_k" href="functions/split.html">split</a> <span class="q">/^x/m</span></code>
, which is also considered to be a bug and
will be fixed in a future version.)
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122761">[perl #122761]</a></p>
</li>
<li>
<p>The little-known <code class="inline"><a class="l_k" href="functions/my.html">my</a> <span class="w">Class</span> <span class="i">$var</span></code>
syntax (see <a href="fields.html">fields</a> and <a href="attributes.html">attributes</a>)
could get confused in the scope of <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">utf8</span></code>
if <code class="inline"><span class="w">Class</span></code>
were a constant
whose value contained Latin-1 characters.</p>
</li>
<li>
<p>Locking and unlocking values via <a href="Hash/Util.html">Hash::Util</a> or <code class="inline"><span class="w">Internals::SvREADONLY</span></code>
no longer has any effect on values that were read-only to begin with.
Previously, unlocking such values could result in crashes, hangs or
other erratic behavior.</p>
</li>
<li>
<p>Some unterminated <code class="inline"><span class="s">(</span><span class="q">?(...)...)</span></code>
constructs in regular expressions would
either crash or give erroneous error messages. <code class="inline"><span class="q">/(?(1)/</span></code>
is one such
example.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/pack.html">pack</a> <span class="q">"w"</span><span class="cm">,</span> <span class="i">$tied</span></code>
no longer calls FETCH twice.</p>
</li>
<li>
<p>List assignments like <code class="inline"><span class="s">(</span><span class="i">$x</span><span class="cm">,</span> <span class="i">$z</span><span class="s">)</span> = <span class="s">(</span><span class="n">1</span><span class="cm">,</span> <span class="i">$y</span><span class="s">)</span></code>
now work correctly if <code class="inline"><span class="i">$x</span></code>
and
<code class="inline"><span class="i">$y</span></code>
have been aliased by <code class="inline">foreach</code>
.</p>
</li>
<li>
<p>Some patterns including code blocks with syntax errors, such as
<code class="inline"><span class="q">/ (?{(^{})/</span></code>
, would hang or fail assertions on debugging builds. Now
they produce errors.</p>
</li>
<li>
<p>An assertion failure when parsing <code class="inline"><a class="l_k" href="functions/sort.html">sort</a></code> with debugging enabled has been
fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122771">[perl #122771]</a>.</p>
</li>
<li>
<p><code class="inline"><span class="i">*a</span> = <span class="i">*b</span><span class="sc">;</span> <span class="i">@a</span> = <a class="l_k" href="functions/split.html">split</a> <span class="q">//</span><span class="cm">,</span> <span class="i">$b</span>[<span class="n">1</span>]</code>
could do a bad read and produce junk
results.</p>
</li>
<li>
<p>In <code class="inline"><span class="s">(</span><span class="s">)</span> = <span class="i">@array</span> = <a class="l_k" href="functions/split.html">split</a></code>
, the <code class="inline"><span class="s">(</span><span class="s">)</span> =</code>
at the beginning no longer confuses
the optimizer into assuming a limit of 1.</p>
</li>
<li>
<p>Fatal warnings no longer prevent the output of syntax errors.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122966">[perl #122966]</a>.</p>
</li>
<li>
<p>Fixed a NaN double-to-long-double conversion error on VMS. For quiet NaNs
(and only on Itanium, not Alpha) negative infinity instead of NaN was
produced.</p>
</li>
<li>
<p>Fixed the issue that caused <code class="inline"><span class="w">make</span> <span class="w">distclean</span></code>
to incorrectly leave some
files behind.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122820">[perl #122820]</a>.</p>
</li>
<li>
<p>AIX now sets the length in <code class="inline"><a class="l_k" href="functions/getsockopt.html">getsockopt</a></code> correctly.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d120835">[perl #120835]</a>.
<a href="http://search.cpan.org/perldoc/https:#%2frt.cpan.org%2fTicket%2fDisplay.html%3fid%3d91183">[cpan #91183]</a>.
<a href="http://search.cpan.org/perldoc/https:#%2frt.cpan.org%2fTicket%2fDisplay.html%3fid%3d85570">[cpan #85570]</a>.</p>
</li>
<li>
<p>The optimization phase of a regexp compilation could run "forever" and
exhaust all memory under certain circumstances; now fixed.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122283">[perl #122283]</a>.</p>
</li>
<li>
<p>The test script <i>t/op/crypt.t</i> now uses the SHA-256 algorithm if the
default one is disabled, rather than giving failures.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d121591">[perl #121591]</a>.</p>
</li>
<li>
<p>Fixed an off-by-one error when setting the size of a shared array.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122950">[perl #122950]</a>.</p>
</li>
<li>
<p>Fixed a bug that could cause perl to enter an infinite loop during
compilation. In particular, a <code class="inline"><a class="l_k" href="functions/while.html">while(1)</a></code> within a sublist, <i>e.g.</i></p>
<pre class="verbatim"><ol><li><a name="foo"></a> sub <span class="m">foo</span> <span class="s">{</span> <span class="s">(</span><span class="s">)</span> = <span class="s">(</span><span class="i">$a</span><span class="cm">,</span> <a class="l_k" href="functions/my.html">my</a> <span class="i">$b</span><span class="cm">,</span> <span class="s">(</span><span class="i">$c</span><span class="cm">,</span> <a class="l_k" href="functions/do.html">do</a> <span class="s">{</span> <a class="l_k" href="functions/while.html">while</a><span class="s">(</span><span class="n">1</span><span class="s">)</span> <span class="s">{</span><span class="s">}</span> <span class="s">}</span><span class="s">)</span><span class="s">)</span> <span class="s">}</span></li></ol></pre><p>The bug was introduced in 5.20.0
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d122995">[perl #122995]</a>.</p>
</li>
<li>
<p>On Win32, if a variable was <code class="inline"><a class="l_k" href="functions/local.html">local</a></code>-ized in a pseudo-process that later
forked, restoring the original value in the child pseudo-process caused
memory corruption and a crash in the child pseudo-process (and therefore the
OS process).
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d40565">[perl #40565]</a>.</p>
</li>
<li>
<p>Calling <code class="inline"><a class="l_k" href="functions/write.html">write</a></code> on a format with a <code class="inline">^<span class="i">**</span></code>
field could produce a panic
in <code class="inline"><span class="i">sv_chop</span><span class="s">(</span><span class="s">)</span></code>
if there were insufficient arguments or if the variable
used to fill the field was empty.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123245">[perl #123245]</a>.</p>
</li>
<li>
<p>Non-ASCII lexical sub names now appear without trailing junk when they
appear in error messages.</p>
</li>
<li>
<p>The <code class="inline">\<span class="i">@</span></code>
subroutine prototype no longer flattens parenthesized arrays
(taking a reference to each element), but takes a reference to the array
itself.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d47363">[perl #47363]</a>.</p>
</li>
<li>
<p>A block containing nothing except a C-style <code class="inline">for</code>
loop could corrupt the
stack, causing lists outside the block to lose elements or have elements
overwritten. This could happen with <code class="inline"><a class="l_k" href="functions/map.html">map</a> <span class="s">{</span> <a class="l_k" href="functions/for.html">for</a><span class="s">(</span>...<span class="s">)</span><span class="s">{</span>...<span class="s">}</span> <span class="s">}</span> ...</code>
and with
lists containing <code class="inline"><a class="l_k" href="functions/do.html">do</a> <span class="s">{</span> <a class="l_k" href="functions/for.html">for</a><span class="s">(</span>...<span class="s">)</span><span class="s">{</span>...<span class="s">}</span> <span class="s">}</span></code>
.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123286">[perl #123286]</a>.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/scalar.html">scalar()</a></code> now propagates lvalue context, so that
<code class="inline"><a class="l_k" href="functions/for.html">for</a><span class="s">(</span><a class="l_k" href="functions/scalar.html">scalar</a><span class="s">(</span><span class="i">$#foo</span><span class="s">)</span><span class="s">)</span> <span class="s">{</span> ... <span class="s">}</span></code>
can modify <code class="inline"><span class="i">$#foo</span></code>
through <code class="inline"><span class="i">$_</span></code>
.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/qr.html">qr/@array(?{block})/</a></code> no longer dies with "Bizarre copy of ARRAY".
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123344">[perl #123344]</a>.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/eval.html">eval</a> <span class="q">'$variable'</span></code>
in nested named subroutines would sometimes look up a
global variable even with a lexical variable in scope.</p>
</li>
<li>
<p>In perl 5.20.0, <code class="inline"><a class="l_k" href="functions/sort.html">sort</a> <span class="i">CORE::fake</span></code>
where 'fake' is anything other than a
keyword, started chopping off the last 6 characters and treating the result
as a sort sub name. The previous behavior of treating <code class="inline"><span class="w">CORE::fake</span></code>
as a
sort sub name has been restored.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123410">[perl #123410]</a>.</p>
</li>
<li>
<p>Outside of <code class="inline"><a class="l_k" href="functions/use.html">use</a> <span class="w">utf8</span></code>
, a single-character Latin-1 lexical variable is
disallowed. The error message for it, "Can't use global <code class="inline"><span class="i">$foo</span></code>
...", was
giving garbage instead of the variable name.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/readline.html">readline</a></code> on a nonexistent handle was causing <code class="inline"><span class="i">$</span>{<span class="w">^LAST_FH</span>}</code>
to produce a
reference to an undefined scalar (or fail an assertion). Now
<code class="inline"><span class="i">$</span>{<span class="w">^LAST_FH</span>}</code>
ends up undefined.</p>
</li>
<li>
<p><code class="inline"><span class="s">(</span>...<span class="s">)</span> x ...</code>
in void context now applies scalar context to the left-hand
argument, instead of the context the current sub was called in.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d123020">[perl #123020]</a>.</p>
</li>
</ul>
<a name="Known-Problems"></a><h1>Known Problems</h1>
<ul>
<li>
<p><code class="inline"><a class="l_k" href="functions/pack.html">pack</a></code>-ing a NaN on a perl compiled with Visual C 6 does not behave properly,
leading to a test failure in <i>t/op/infnan.t</i>.
<a href="http://search.cpan.org/perldoc/https:#%2frt.perl.org%2fTicket%2fDisplay.html%3fid%3d125203">[perl 125203]</a></p>
</li>
<li>
<p>A goal is for Perl to be able to be recompiled to work reasonably well on any
Unicode version. In Perl 5.22, though, the earliest such version is Unicode
5.1 (current is 7.0).</p>
</li>
<li>
<p>EBCDIC platforms</p>
<ul>
<li>
<p>The <code class="inline">cmp</code>
(and hence <code class="inline"><a class="l_k" href="functions/sort.html">sort</a></code>) operators do not necessarily give the
correct results when both operands are UTF-EBCDIC encoded strings and
there is a mixture of ASCII and/or control characters, along with other
characters.</p>
</li>
<li>
<p>Ranges containing <code class="inline">\<span class="i">N</span><span class="s">{</span>...<span class="s">}</span></code>
in the <code class="inline"><a class="l_k" href="functions/tr.html">tr///</a></code> (and <code class="inline"><a class="l_k" href="functions/y.html">y///</a></code>)
transliteration operators are treated differently than the equivalent
ranges in regular expression patterns. They should, but don't, cause
the values in the ranges to all be treated as Unicode code points, and
not native ones. (<a href="perlre.html#Version-8-Regular-Expressions">Version 8 Regular Expressions in perlre</a> gives
details as to how it should work.)</p>
</li>
<li>
<p>Encode and encoding are mostly broken.</p>
</li>
<li>
<p>Many CPAN modules that are shipped with core show failing tests.</p>
</li>
<li>
<p><code class="inline"><a class="l_k" href="functions/pack.html">pack</a></code>/<code class="inline"><a class="l_k" href="functions/unpack.html">unpack</a></code> with <code class="inline"><span class="q">"U0"</span></code>
format may not work properly.</p>
</li>
</ul>
</li>
<li>
<p>The following modules are known to have test failures with this version of
Perl. In many cases, patches have been submitted, so there will hopefully be
new releases soon:</p>
<ul>
<li>
<p><a href="http://search.cpan.org/perldoc/B::Generate">B::Generate</a> version 1.50</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/B::Utils">B::Utils</a> version 0.25</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/Coro">Coro</a> version 6.42</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/Dancer">Dancer</a> version 1.3130</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/Data::Alias">Data::Alias</a> version 1.18</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/Data::Dump::Streamer">Data::Dump::Streamer</a> version 2.38</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/Data::Util">Data::Util</a> version 0.63</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/Devel::Spy">Devel::Spy</a> version 0.07</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/invoker">invoker</a> version 0.34</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/Lexical::Var">Lexical::Var</a> version 0.009</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/LWP::ConsoleLogger">LWP::ConsoleLogger</a> version 0.000018</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/Mason">Mason</a> version 2.22</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/NgxQueue">NgxQueue</a> version 0.02</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/Padre">Padre</a> version 1.00</p>
</li>
<li>
<p><a href="http://search.cpan.org/perldoc/Parse::Keyword">Parse::Keyword</a> 0.08</p>
</li>
</ul>
</li>
</ul>
<a name="Obituary"></a><h1>Obituary</h1>
<p>Brian McCauley died on May 8, 2015. He was a frequent poster to Usenet, Perl
Monks, and other Perl forums, and made several CPAN contributions under the
nick NOBULL, including to the Perl FAQ. He attended almost every
YAPC::Europe, and indeed, helped organise YAPC::Europe 2006 and the QA
Hackathon 2009. His wit and his delight in intricate systems were
particularly apparent in his love of board games; many Perl mongers will
have fond memories of playing Fluxx and other games with Brian. He will be
missed.</p>
<a name="Acknowledgements"></a><h1>Acknowledgements</h1>
<p>Perl 5.22.0 represents approximately 12 months of development since Perl 5.20.0
and contains approximately 590,000 lines of changes across 2,400 files from 94
authors.</p>
<p>Excluding auto-generated files, documentation and release tools, there were
approximately 370,000 lines of changes to 1,500 .pm, .t, .c and .h files.</p>
<p>Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed the
improvements that became Perl 5.22.0:</p>
<p>Aaron Crane, Abhijit Menon-Sen, Abigail, Alberto Simões, Alex Solovey, Alex
Vandiver, Alexandr Ciornii, Alexandre (Midnite) Jousset, Andreas König,
Andreas Voegele, Andrew Fresh, Andy Dougherty, Anthony Heading, Aristotle
Pagaltzis, brian d foy, Brian Fraser, Chad Granum, Chris 'BinGOs' Williams,
Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan, Darin McBride, Dave
Rolsky, David Golden, David Mitchell, David Wheeler, Dmitri Tikhonov, Doug
Bell, E. Choroba, Ed J, Eric Herman, Father Chrysostomos, George Greer, Glenn
D. Golden, Graham Knop, H.Merijn Brand, Herbert Breunung, Hugo van der Sanden,
James E Keenan, James McCoy, James Raspass, Jan Dubois, Jarkko Hietaniemi,
Jasmine Ngan, Jerry D. Hedden, Jim Cromie, John Goodyear, kafka, Karen
Etheridge, Karl Williamson, Kent Fredric, kmx, Lajos Veres, Leon Timmermans,
Lukas Mai, Mathieu Arnold, Matthew Horsfall, Max Maischein, Michael Bunk,
Nicholas Clark, Niels Thykier, Niko Tyni, Norman Koch, Olivier Mengué, Peter
John Acklam, Peter Martini, Petr Písař, Philippe Bruhat (BooK), Pierre
Bogossian, Rafael Garcia-Suarez, Randy Stauner, Reini Urban, Ricardo Signes,
Rob Hoelz, Rostislav Skudnov, Sawyer X, Shirakata Kentaro, Shlomi Fish,
Sisyphus, Slaven Rezic, Smylers, Steffen Müller, Steve Hay, Sullivan Beck,
syber, Tadeusz Sośnierz, Thomas Sibley, Todd Rinaldo, Tony Cook, Vincent Pit,
Vladimir Marek, Yaroslav Kuzmin, Yves Orton, Ævar Arnfjörð Bjarmason.</p>
<p>The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.</p>
<p>Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.</p>
<p>For a more complete list of all of Perl's historical contributors, please see
the <i>AUTHORS</i> file in the Perl source distribution.</p>
<a name="Reporting-Bugs"></a><h1>Reporting Bugs</h1>
<p>If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the perl bug database at
<a href="https://rt.perl.org/">https://rt.perl.org/</a>. There may also be information at
<a href="http://www.perl.org/">http://www.perl.org/</a>, the Perl Home Page.</p>
<p>If you believe you have an unreported bug, please run the <a href="perlbug.html">perlbug</a> 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 <code class="inline"><span class="w">perl</span> -<span class="w">V</span></code>
,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.</p>
<p>If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send it
to perl5-security-report@perl.org. This points to a closed subscription
unarchived mailing list, which includes all the core committers, who will be
able to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported. Please only use this address for
security issues in the Perl core, not for modules independently distributed on
CPAN.</p>
<a name="SEE-ALSO"></a><h1>SEE ALSO</h1>
<p>The <i>Changes</i> file for an explanation of how to view exhaustive details on
what changed.</p>
<p>The <i>INSTALL</i> file for how to build Perl.</p>
<p>The <i>README</i> file for general stuff.</p>
<p>The <i>Artistic</i> and <i>Copying</i> files for copyright information.</p>
<div id="page_index" class="hud_container">
<div id="page_index_header" class="hud_header">
<div id="page_index_close" class="hud_close"><a href="#" onClick="pageIndex.hide();return false;"></a></div>
<div id="page_index_title" class="hud_title"><span class="hud_span_top">Page index</span></div>
<div id="page_index_topright" class="hud_topright"></div>
</div>
<div id="page_index_content" class="hud_content">
<ul><li><a href="#NAME">NAME</a><li><a href="#DESCRIPTION">DESCRIPTION</a><li><a href="#Core-Enhancements">Core Enhancements</a><ul><li><a href="#New-bitwise-operators">New bitwise operators</a><li><a href="#New-double-diamond-operator">New double-diamond operator</a><li><a href="#New-%5cb-boundaries-in-regular-expressions">New \b boundaries in regular expressions</a><li><a href="#Non-Capturing-Regular-Expression-Flag">Non-Capturing Regular Expression Flag</a><li><a href="#use-re-'strict'">use re 'strict'</a><li><a href="#Unicode-7.0-(with-correction)-is-now-supported">Unicode 7.0 (with correction) is now supported</a><li><a href="#use-locale-can-restrict-which-locale-categories-are-affected">use locale can restrict which locale categories are affected</a><li><a href="#Perl-now-supports-POSIX-2008-locale-currency-additions">Perl now supports POSIX 2008 locale currency additions</a><li><a href="#Better-heuristics-on-older-platforms-for-determining-locale-UTF-8ness">Better heuristics on older platforms for determining locale UTF-8ness</a><li><a href="#Aliasing-via-reference">Aliasing via reference</a><li><a href="#prototype-with-no-arguments">prototype with no arguments</a><li><a href="#New-%3aconst-subroutine-attribute">New :const subroutine attribute</a><li><a href="#fileno-now-works-on-directory-handles">fileno now works on directory handles</a><li><a href="#List-form-of-pipe-open-implemented-for-Win32">List form of pipe open implemented for Win32</a><li><a href="#Assignment-to-list-repetition">Assignment to list repetition</a><li><a href="#Infinity-and-NaN-(not-a-number)-handling-improved">Infinity and NaN (not-a-number) handling improved</a><li><a href="#Floating-point-parsing-has-been-improved">Floating point parsing has been improved</a><li><a href="#Packing-infinity-or-not-a-number-into-a-character-is-now-fatal">Packing infinity or not-a-number into a character is now fatal</a><li><a href="#Experimental-C-Backtrace-API">Experimental C Backtrace API</a></ul><li><a href="#Security">Security</a><ul><li><a href="#Perl-is-now-compiled-with--fstack-protector-strong-if-available">Perl is now compiled with -fstack-protector-strong if available</a><li><a href="#The-the-Safe-manpage-module-could-allow-outside-packages-to-be-replaced">The the Safe manpage module could allow outside packages to be replaced</a><li><a href="#Perl-is-now-always-compiled-with--D_FORTIFY_SOURCE%3d2-if-available">Perl is now always compiled with -D_FORTIFY_SOURCE=2 if available</a></ul><li><a href="#Incompatible-Changes">Incompatible Changes</a><ul><li><a href="#Subroutine-signatures-moved-before-attributes">Subroutine signatures moved before attributes</a><li><a href="#%26-and-%5c%26-prototypes-accepts-only-subs">& and \& prototypes accepts only subs</a><li><a href="#use-encoding-is-now-lexical">use encoding is now lexical</a><li><a href="#List-slices-returning-empty-lists">List slices returning empty lists</a><li><a href="#%5cN%7b%7d-with-a-sequence-of-multiple-spaces-is-now-a-fatal-error">\N{} with a sequence of multiple spaces is now a fatal error</a><li><a href="#use-UNIVERSAL-'...'-is-now-a-fatal-error">use UNIVERSAL '...' is now a fatal error</a><li><a href="#In-double-quotish-%5cc_X_%2c-_X_-must-now-be-a-printable-ASCII-character">In double-quotish \c_X_, _X_ must now be a printable ASCII character</a><li><a href="#Splitting-the-tokens-(%3f-and-(*-in-regular-expressions-is-now-a-fatal-compilation-error.">Splitting the tokens (? and (* in regular expressions is now a fatal compilation error.</a><li><a href="#qr%2ffoo%2fx-now-ignores-all-Unicode-pattern-white-space">qr/foo/x now ignores all Unicode pattern white space</a><li><a href="#Comment-lines-within-(%3f%5b-%5d)-are-now-ended-only-by-a-%5cn">Comment lines within (?[ ]) are now ended only by a \n</a><li><a href="#(%3f%5b...%5d)-operators-now-follow-standard-Perl-precedence">(?[...]) operators now follow standard Perl precedence</a><li><a href="#Omitting-%25-and-%40-on-hash-and-array-names-is-no-longer-permitted">Omitting % and @ on hash and array names is no longer permitted</a><li><a href="#%22%24!%22-text-is-now-in-English-outside-the-scope-of-use-locale">"$!" text is now in English outside the scope of use locale</a><li><a href="#%22%24!%22-text-will-be-returned-in-UTF-8-when-appropriate">"$!" text will be returned in UTF-8 when appropriate</a><li><a href="#Support-for-%3fPATTERN%3f-without-explicit-operator-has-been-removed">Support for ?PATTERN? without explicit operator has been removed</a><li><a href="#defined(%40array)-and-defined(%25hash)-are-now-fatal-errors">defined(@array) and defined(%hash) are now fatal errors</a><li><a href="#Using-a-hash-or-an-array-as-a-reference-are-now-fatal-errors">Using a hash or an array as a reference are now fatal errors</a><li><a href="#Changes-to-the-*-prototype">Changes to the * prototype</a></ul><li><a href="#Deprecations">Deprecations</a><ul><li><a href="#Setting-%24%7b%5eENCODING%7d-to-anything-but-undef">Setting ${^ENCODING} to anything but undef</a><li><a href="#Use-of-non-graphic-characters-in-single-character-variable-names">Use of non-graphic characters in single-character variable names</a><li><a href="#Inlining-of-sub-()-%7b-%24var-%7d-with-observable-side-effects">Inlining of sub () { $var } with observable side-effects</a><li><a href="#Use-of-multiple-%2fx-regexp-modifiers">Use of multiple /x regexp modifiers</a><li><a href="#Using-a-NO-BREAK-space-in-a-character-alias-for-%5cN%7b...%7d-is-now-deprecated">Using a NO-BREAK space in a character alias for \N{...} is now deprecated</a><li><a href="#A-literal-%22%7b%22-should-now-be-escaped-in-a-pattern">A literal "{" should now be escaped in a pattern</a><li><a href="#Making-all-warnings-fatal-is-discouraged">Making all warnings fatal is discouraged</a></ul><li><a href="#Performance-Enhancements">Performance Enhancements</a><li><a href="#Modules-and-Pragmata">Modules and Pragmata</a><ul><li><a href="#Updated-Modules-and-Pragmata">Updated Modules and Pragmata</a><li><a href="#Removed-Modules-and-Pragmata">Removed Modules and Pragmata</a></ul><li><a href="#Documentation">Documentation</a><ul><li><a href="#New-Documentation">New Documentation</a><li><a href="#Changes-to-Existing-Documentation">Changes to Existing Documentation</a></ul><li><a href="#Diagnostics">Diagnostics</a><ul><li><a href="#New-Diagnostics">New Diagnostics</a><li><a href="#Changes-to-Existing-Diagnostics">Changes to Existing Diagnostics</a><li><a href="#Diagnostic-Removals">Diagnostic Removals</a></ul><li><a href="#Utility-Changes">Utility Changes</a><ul><li><a href="#_find2perl_%2c-_s2p_-and-_a2p_-removal">_find2perl_, _s2p_ and _a2p_ removal</a><li><a href="#the-h2ph-manpage">the h2ph manpage</a><li><a href="#the-encguess-manpage">the encguess manpage</a></ul><li><a href="#Configuration-and-Compilation">Configuration and Compilation</a><li><a href="#Testing">Testing</a><li><a href="#Platform-Support">Platform Support</a><ul><li><a href="#Regained-Platforms">Regained Platforms</a><li><a href="#Discontinued-Platforms">Discontinued Platforms</a><li><a href="#Platform-Specific-Notes">Platform-Specific Notes</a></ul><li><a href="#Internal-Changes">Internal Changes</a><li><a href="#Selected-Bug-Fixes">Selected Bug Fixes</a><li><a href="#Known-Problems">Known Problems</a><li><a href="#Obituary">Obituary</a><li><a href="#Acknowledgements">Acknowledgements</a><li><a href="#Reporting-Bugs">Reporting Bugs</a><li><a href="#SEE-ALSO">SEE ALSO</a></ul>
</div>
<div id="page_index_footer" class="hud_footer">
<div id="page_index_bottomleft" class="hud_bottomleft"></div>
<div id="page_index_bottom" class="hud_bottom"><span class="hud_span_bottom"></span></div>
<div id="page_index_resize" class="hud_resize"></div>
</div>
</div>
</div>
<div id="content_footer">
</div>
</div>
<div class="clear"></div>
</div>
<div id="footer">
<div id="footer_content">
<div id="footer_strapline">
perldoc.perl.org - Official documentation for the Perl programming language
</div>
<div id="footer_links">
<div id="address">
<p class="name">Contact details</p>
<p class="address">
Site maintained by <a href="mailto:jj@jonallen.info">Jon Allen (JJ)</a><br>
</p>
<p class="contact">
Documentation maintained by the <a href="http://lists.cpan.org/showlist.cgi?name=perl5-porters">Perl 5 Porters</a>
</p>
</div>
<ul class="f1">
<li>Manual
<ul class="f2">
<li><a href="index-overview.html">Overview</a>
<li><a href="index-tutorials.html">Tutorials</a>
<li><a href="index-faq.html">FAQs</a>
<li><a href="index-history.html">Changes</a>
</ul>
<li>Reference
<ul class="f2">
<li><a href="index-language.html">Language</a>
<li><a href="index-functions.html">Functions</a>
<li><a href="perlop.html">Operators</a>
<li><a href="perlvar.html">Variables</a>
</ul>
<li>Modules
<ul class="f2">
<li><a href="index-modules-A.html">Modules</a>
<li><a href="index-pragmas.html">Pragmas</a>
<li><a href="index-utilities.html">Utilities</a>
</ul>
<li>Misc
<ul class="f2">
<li><a href="index-licence.html">License</a>
<li><a href="index-internals.html">Internals</a>
<li><a href="index-platforms.html">Platforms</a>
</ul> </ul>
<div class="clear"></div>
</div>
</div>
<div id="footer_end">
</div>
</div>
</div>
<script language="JavaScript" type="text/javascript" src="static/exploreperl.js"></script>
<script language="JavaScript" src="static/combined-20100403.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
perldoc.setPath(0);
perldoc.pageName = 'perldelta';
perldoc.pageAddress = 'perldelta.html';
perldoc.contentPage = 1;
explorePerl.render();
explorePerl.addEvents('explore_anchor');
</script>
</body>
</html>
|