This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Module::CoreList for 5.31.0
[perl5.git] / dist / Module-CoreList / lib / Module / CoreList / Utils.pm
CommitLineData
e4f0ee67
CBW
1package Module::CoreList::Utils;
2
3use strict;
4use warnings;
e4f0ee67 5use Module::CoreList;
e4f0ee67 6
96fe4353 7our $VERSION = '5.20190523';
1a58b39a 8our %utilities;
e4f0ee67
CBW
9
10sub utilities {
11 my $perl = shift;
12 $perl = shift if eval { $perl->isa(__PACKAGE__) };
13 return unless $perl or exists $utilities{$perl};
14 return sort keys %{ $utilities{$perl} };
15}
16
02b4438c
KW
17sub _released_order { # Sort helper, to make '?' sort after everything else
18 (substr($Module::CoreList::released{$a}, 0, 1) eq "?")
19 ? ((substr($Module::CoreList::released{$b}, 0, 1) eq "?")
20 ? 0
21 : 1)
22 : ((substr($Module::CoreList::released{$b}, 0, 1) eq "?")
23 ? -1
24 : $Module::CoreList::released{$a} cmp $Module::CoreList::released{$b} )
25}
26
e4f0ee67
CBW
27sub first_release_raw {
28 my $util = shift;
29 $util = shift if eval { $util->isa(__PACKAGE__) };
30 #and scalar @_ and $_[0] =~ m#\A[a-zA-Z_][0-9a-zA-Z_]*(?:(::|')[0-9a-zA-Z_]+)*\z#;
31 my $version = shift;
32
33 my @perls = $version
34 ? grep { exists $utilities{$_}{ $util } &&
35 $utilities{$_}{ $util } ge $version } keys %utilities
36 : grep { exists $utilities{$_}{ $util } } keys %utilities;
37
38 return grep { exists $Module::CoreList::released{$_} } @perls;
39}
40
41sub first_release_by_date {
42 my @perls = &first_release_raw;
43 return unless @perls;
02b4438c 44 return (sort _released_order @perls)[0];
e4f0ee67
CBW
45}
46
47sub first_release {
48 my @perls = &first_release_raw;
49 return unless @perls;
50 return (sort { $a cmp $b } @perls)[0];
51}
52
53sub removed_from {
54 my @perls = &removed_raw;
55 return shift @perls;
56}
57
58sub removed_from_by_date {
02b4438c 59 my @perls = sort _released_order &removed_raw;
e4f0ee67
CBW
60 return shift @perls;
61}
62
63sub removed_raw {
64 my $util = shift;
65 $util = shift if eval { $util->isa(__PACKAGE__) };
66 return unless my @perls = sort { $a cmp $b } first_release_raw($util);
67 @perls = grep { exists $Module::CoreList::released{$_} } @perls;
68 my $last = pop @perls;
69 my @removed = grep { $_ > $last } sort { $a cmp $b } keys %utilities;
70 return @removed;
71}
72
73my %delta = (
74 5 => {
75 changed => {
76 'a2p' => '1',
77 'c2ph' => '1',
78 'cppstdin' => '1',
79 'find2perl' => '1',
80 'pstruct' => '1',
81 's2p' => '1',
82 },
83 removed => {
84 }
85 },
86
87 5.001 => {
88 delta_from => 5,
89 changed => {
90 'h2xs' => '1',
91 },
92 removed => {
93 }
94 },
95
96 5.002 => {
97 delta_from => 5.001,
98 changed => {
99 'h2ph' => '1',
100 'perlbug' => '1',
101 'perldoc' => '1',
102 'pod2html' => '1',
103 'pod2latex' => '1',
104 'pod2man' => '1',
105 'pod2text' => '1',
106 },
107 removed => {
108 }
109 },
110
111 5.00307 => {
112 delta_from => 5.002,
113 changed => {
114 'pl2pm' => '1',
115 },
116 removed => {
117 'cppstdin' => 1,
118 'pstruct' => 1,
119 }
120 },
121
122 5.004 => {
123 delta_from => 5.00307,
124 changed => {
125 'splain' => '1',
126 },
127 removed => {
128 }
129 },
130
131 5.005 => {
132 delta_from => 5.00405,
133 changed => {
134 'perlcc' => '1',
135 },
136 removed => {
137 }
138 },
139
140 5.00503 => {
141 delta_from => 5.005,
142 changed => {
143 },
144 removed => {
145 }
146 },
147
148 5.00405 => {
149 delta_from => 5.004,
150 changed => {
151 },
152 removed => {
153 }
154 },
155
156 5.006 => {
157 delta_from => 5.00504,
158 changed => {
159 'dprofpp' => '1',
160 'pod2usage' => '1',
161 'podchecker' => '1',
162 'podselect' => '1',
163 'pstruct' => '1',
164 },
165 removed => {
166 }
167 },
168
169 5.006001 => {
170 delta_from => 5.006,
171 changed => {
172 },
173 removed => {
174 }
175 },
176
177 5.007003 => {
178 delta_from => 5.006002,
179 changed => {
180 'libnetcfg' => '1',
181 'perlivp' => '1',
182 'psed' => '1',
183 'xsubpp' => '1',
184 },
185 removed => {
186 }
187 },
188
189 5.008 => {
190 delta_from => 5.007003,
191 changed => {
192 'enc2xs' => '1',
193 'piconv' => '1',
194 },
195 removed => {
196 }
197 },
198
199 5.008001 => {
200 delta_from => 5.008,
201 changed => {
202 'cpan' => '1',
203 },
204 removed => {
205 }
206 },
207
208 5.009 => {
209 delta_from => 5.008009,
210 changed => {
211 },
212 removed => {
213 'corelist' => 1,
214 'instmodsh' => 1,
215 'prove' => 1,
216 }
217 },
218
219 5.008002 => {
220 delta_from => 5.008001,
221 changed => {
222 },
223 removed => {
224 }
225 },
226
227 5.006002 => {
228 delta_from => 5.006001,
229 changed => {
230 },
231 removed => {
232 }
233 },
234
235 5.008003 => {
236 delta_from => 5.008002,
237 changed => {
238 'instmodsh' => '1',
239 'prove' => '1',
240 },
241 removed => {
242 }
243 },
244
245 5.00504 => {
246 delta_from => 5.00503,
247 changed => {
248 },
249 removed => {
250 }
251 },
252
253 5.009001 => {
254 delta_from => 5.009,
255 changed => {
256 'instmodsh' => '1',
257 'prove' => '1',
258 },
259 removed => {
260 }
261 },
262
263 5.008004 => {
264 delta_from => 5.008003,
265 changed => {
266 },
267 removed => {
268 }
269 },
270
271 5.008005 => {
272 delta_from => 5.008004,
273 changed => {
274 },
275 removed => {
276 }
277 },
278
279 5.008006 => {
280 delta_from => 5.008005,
281 changed => {
282 },
283 removed => {
284 }
285 },
286
287 5.009002 => {
288 delta_from => 5.009001,
289 changed => {
290 'corelist' => '1',
291 },
292 removed => {
293 }
294 },
295
296 5.008007 => {
297 delta_from => 5.008006,
298 changed => {
299 },
300 removed => {
301 }
302 },
303
304 5.009003 => {
305 delta_from => 5.009002,
306 changed => {
307 'ptar' => '1',
308 'ptardiff' => '1',
309 'shasum' => '1',
310 },
311 removed => {
312 }
313 },
314
315 5.008008 => {
316 delta_from => 5.008007,
317 changed => {
318 },
319 removed => {
320 }
321 },
322
323 5.009004 => {
324 delta_from => 5.009003,
325 changed => {
326 'config_data' => '1',
327 },
328 removed => {
329 }
330 },
331
332 5.009005 => {
333 delta_from => 5.009004,
334 changed => {
335 'cpan2dist' => '1',
336 'cpanp' => '1',
337 'cpanp-run-perl' => '1',
338 },
339 removed => {
340 'perlcc' => 1,
341 }
342 },
343
344 5.010000 => {
345 delta_from => 5.009005,
346 changed => {
347 },
348 removed => {
349 }
350 },
351
352 5.008009 => {
353 delta_from => 5.008008,
354 changed => {
355 'corelist' => '1',
356 },
357 removed => {
358 }
359 },
360
361 5.010001 => {
362 delta_from => 5.010000,
363 changed => {
364 },
365 removed => {
366 }
367 },
368
369 5.011 => {
370 delta_from => 5.010001,
371 changed => {
372 },
373 removed => {
374 }
375 },
376
377 5.011001 => {
378 delta_from => 5.011,
379 changed => {
380 },
381 removed => {
382 }
383 },
384
385 5.011002 => {
386 delta_from => 5.011001,
387 changed => {
388 'perlthanks' => '1',
389 },
390 removed => {
391 }
392 },
393
394 5.011003 => {
395 delta_from => 5.011002,
396 changed => {
397 },
398 removed => {
399 }
400 },
401
402 5.011004 => {
403 delta_from => 5.011003,
404 changed => {
405 },
406 removed => {
407 }
408 },
409
410 5.011005 => {
411 delta_from => 5.011004,
412 changed => {
413 },
414 removed => {
415 }
416 },
417
418 5.012 => {
419 delta_from => 5.011005,
420 changed => {
421 },
422 removed => {
423 }
424 },
425
426 5.013 => {
427 delta_from => 5.012005,
428 changed => {
429 },
430 removed => {
431 }
432 },
433
434 5.012001 => {
435 delta_from => 5.012,
436 changed => {
437 },
438 removed => {
439 }
440 },
441
442 5.013001 => {
443 delta_from => 5.013,
444 changed => {
445 },
446 removed => {
447 }
448 },
449
450 5.013002 => {
451 delta_from => 5.013001,
452 changed => {
453 },
454 removed => {
455 }
456 },
457
458 5.013003 => {
459 delta_from => 5.013002,
460 changed => {
461 },
462 removed => {
463 }
464 },
465
466 5.013004 => {
467 delta_from => 5.013003,
468 changed => {
469 },
470 removed => {
471 }
472 },
473
474 5.012002 => {
475 delta_from => 5.012001,
476 changed => {
477 },
478 removed => {
479 }
480 },
481
482 5.013005 => {
483 delta_from => 5.013004,
484 changed => {
485 },
486 removed => {
487 }
488 },
489
490 5.013006 => {
491 delta_from => 5.013005,
492 changed => {
493 },
494 removed => {
495 }
496 },
497
498 5.013007 => {
499 delta_from => 5.013006,
500 changed => {
501 'ptargrep' => '1',
502 },
503 removed => {
504 }
505 },
506
507 5.013008 => {
508 delta_from => 5.013007,
509 changed => {
510 },
511 removed => {
512 }
513 },
514
515 5.013009 => {
516 delta_from => 5.013008,
517 changed => {
518 'json_pp' => '1',
519 },
520 removed => {
521 }
522 },
523
524 5.012003 => {
525 delta_from => 5.012002,
526 changed => {
527 },
528 removed => {
529 }
530 },
531
532 5.013010 => {
533 delta_from => 5.013009,
534 changed => {
535 },
536 removed => {
537 }
538 },
539
540 5.013011 => {
541 delta_from => 5.013010,
542 changed => {
543 },
544 removed => {
545 }
546 },
547
548 5.014 => {
549 delta_from => 5.013011,
550 changed => {
551 },
552 removed => {
553 }
554 },
555
556 5.014001 => {
557 delta_from => 5.014,
558 changed => {
559 },
560 removed => {
561 }
562 },
563
564 5.015 => {
565 delta_from => 5.014004,
566 changed => {
567 },
568 removed => {
569 'dprofpp' => 1,
570 }
571 },
572
573 5.012004 => {
574 delta_from => 5.012003,
575 changed => {
576 },
577 removed => {
578 }
579 },
580
581 5.015001 => {
582 delta_from => 5.015,
583 changed => {
584 },
585 removed => {
586 }
587 },
588
589 5.015002 => {
590 delta_from => 5.015001,
591 changed => {
592 },
593 removed => {
594 }
595 },
596
597 5.015003 => {
598 delta_from => 5.015002,
599 changed => {
600 },
601 removed => {
602 }
603 },
604
605 5.014002 => {
606 delta_from => 5.014001,
607 changed => {
608 },
609 removed => {
610 }
611 },
612
613 5.015004 => {
614 delta_from => 5.015003,
615 changed => {
616 },
617 removed => {
618 }
619 },
620
621 5.015005 => {
622 delta_from => 5.015004,
623 changed => {
624 },
625 removed => {
626 }
627 },
628
629 5.015006 => {
630 delta_from => 5.015005,
631 changed => {
632 'zipdetails' => '1',
633 },
634 removed => {
635 }
636 },
637
638 5.015007 => {
639 delta_from => 5.015006,
640 changed => {
641 },
642 removed => {
643 }
644 },
645
646 5.015008 => {
647 delta_from => 5.015007,
648 changed => {
649 },
650 removed => {
651 }
652 },
653
654 5.015009 => {
655 delta_from => 5.015008,
656 changed => {
657 },
658 removed => {
659 }
660 },
661
662 5.016 => {
663 delta_from => 5.015009,
664 changed => {
665 },
666 removed => {
667 }
668 },
669
670 5.017 => {
671 delta_from => 5.016003,
672 changed => {
673 },
674 removed => {
675 }
676 },
677
678 5.017001 => {
679 delta_from => 5.017,
680 changed => {
681 },
682 removed => {
683 }
684 },
685
686 5.017002 => {
687 delta_from => 5.017001,
688 changed => {
689 },
690 removed => {
691 }
692 },
693
694 5.016001 => {
695 delta_from => 5.016,
696 changed => {
697 },
698 removed => {
699 }
700 },
701
702 5.017003 => {
703 delta_from => 5.017002,
704 changed => {
705 },
706 removed => {
707 }
708 },
709
710 5.017004 => {
711 delta_from => 5.017003,
712 changed => {
713 },
714 removed => {
715 }
716 },
717
718 5.014003 => {
719 delta_from => 5.014002,
720 changed => {
721 },
722 removed => {
723 }
724 },
725
726 5.017005 => {
727 delta_from => 5.017004,
728 changed => {
729 },
730 removed => {
731 }
732 },
733
734 5.016002 => {
735 delta_from => 5.016001,
736 changed => {
737 },
738 removed => {
739 }
740 },
741
742 5.012005 => {
743 delta_from => 5.012004,
744 changed => {
745 },
746 removed => {
747 }
748 },
749
750 5.017006 => {
751 delta_from => 5.017005,
752 changed => {
753 },
754 removed => {
755 }
756 },
757
758 5.017007 => {
759 delta_from => 5.017006,
760 changed => {
761 },
762 removed => {
763 }
764 },
765
766 5.017008 => {
767 delta_from => 5.017007,
768 changed => {
769 },
770 removed => {
771 }
772 },
773
774 5.017009 => {
775 delta_from => 5.017008,
776 changed => {
777 },
778 removed => {
779 }
780 },
781
782 5.014004 => {
783 delta_from => 5.014003,
784 changed => {
785 },
786 removed => {
787 }
788 },
789
790 5.016003 => {
791 delta_from => 5.016002,
792 changed => {
793 },
794 removed => {
795 }
796 },
797
798 5.017010 => {
799 delta_from => 5.017009,
800 changed => {
801 },
802 removed => {
803 }
804 },
805
806 5.017011 => {
807 delta_from => 5.017010,
808 changed => {
809 },
810 removed => {
811 }
812 },
5730025f
CBW
813 5.018000 => {
814 delta_from => 5.017011,
815 changed => {
816 },
817 removed => {
818 }
819 },
ba4dd7ef
RS
820 5.018001 => {
821 delta_from => 5.018000,
822 changed => {
823 },
6c2a7b42
CBW
824 removed => {
825 }
826 },
827 5.018002 => {
828 delta_from => 5.018001,
829 changed => {
830 },
ba4dd7ef
RS
831 removed => {
832 }
833 },
b616d4df
RS
834 5.018003 => {
835 delta_from => 5.018000,
836 changed => {
837 },
838 removed => {
839 }
840 },
841 5.018004 => {
842 delta_from => 5.018000,
843 changed => {
844 },
845 removed => {
846 }
847 },
5730025f
CBW
848 5.019000 => {
849 delta_from => 5.018000,
850 changed => {
851 },
852 removed => {
853 'cpan2dist' => '1',
854 'cpanp' => '1',
855 'cpanp-run-perl' => '1',
856 'pod2latex' => '1',
857 }
858 },
8c94cb79
CBW
859 5.019001 => {
860 delta_from => 5.019000,
861 changed => {
862 },
863 removed => {
864 }
865 },
d04adc20
DG
866 5.019002 => {
867 delta_from => 5.019001,
868 changed => {
869 },
870 removed => {
871 }
872 },
84ac8f84
CBW
873 5.019003 => {
874 delta_from => 5.019002,
875 changed => {
876 },
877 removed => {
878 }
879 },
37287258
SH
880 5.019004 => {
881 delta_from => 5.019003,
882 changed => {
883 },
884 removed => {
885 }
886 },
fa5fbb39
SH
887 5.019005 => {
888 delta_from => 5.019004,
889 changed => {
890 },
891 removed => {
892 }
893 },
494bd897
SH
894 5.019006 => {
895 delta_from => 5.019005,
896 changed => {
897 },
898 removed => {
899 }
900 },
b3f76264
CBW
901 5.019007 => {
902 delta_from => 5.019006,
903 changed => {
904 },
905 removed => {
906 }
907 },
365f8c3e
CBW
908 5.019008 => {
909 delta_from => 5.019007,
910 changed => {
911 },
912 removed => {
913 }
914 },
a27b5f52
CBW
915 5.019009 => {
916 delta_from => 5.019008,
917 changed => {
918 },
919 removed => {
920 }
921 },
baca4554
TC
922 5.019010 => {
923 delta_from => 5.019009,
924 changed => {
925 },
926 removed => {
927 }
928 },
b776cec1
AC
929 5.019011 => {
930 delta_from => 5.019010,
931 changed => {
932 },
933 removed => {
934 }
935 },
1b6c17c2 936 5.020000 => {
48cbd9dd
SH
937 delta_from => 5.019011,
938 changed => {
939 },
940 removed => {
941 }
942 },
75325e51 943 5.021000 => {
4f2cd4f7 944 delta_from => 5.020000,
75325e51
RS
945 changed => {
946 },
947 removed => {
948 }
949 },
5a534470
RS
950 5.021001 => {
951 delta_from => 5.021000,
952 changed => {
953 },
954 removed => {
04c0d500 955 'a2p' => 1,
5a534470 956 'config_data' => 1,
04c0d500
MH
957 'find2perl' => 1,
958 'psed' => 1,
959 's2p' => 1,
5a534470
RS
960 }
961 },
2901561d
MH
962 5.021002 => {
963 delta_from => 5.021001,
964 changed => {
965 },
966 removed => {
967 }
968 },
633c51bc
A
969 5.021003 => {
970 delta_from => 5.021002,
971 changed => {
972 },
973 removed => {
974 }
975 },
14cc2657
SH
976 5.020001 => {
977 delta_from => 5.02,
5c851aa1
PM
978 changed => {
979 },
980 removed => {
981 }
982 },
14cc2657
SH
983 5.021004 => {
984 delta_from => 5.021003,
1c6aa017
SH
985 changed => {
986 },
987 removed => {
988 }
989 },
84d03adf
SH
990 5.021005 => {
991 delta_from => 5.021004,
992 changed => {
993 },
994 removed => {
995 }
996 },
e22432a4
A
997 5.021006 => {
998 delta_from => 5.021005,
999 changed => {
1000 },
1001 removed => {
1002 }
1003 },
3f572b05
CBW
1004 5.021007 => {
1005 delta_from => 5.021006,
1006 changed => {
1007 },
1008 removed => {
1009 }
1010 },
e31034da
MM
1011 5.021008 => {
1012 delta_from => 5.021007,
1013 changed => {
1014 },
1015 removed => {
1016 }
1017 },
8ad047ea
SH
1018 5.020002 => {
1019 delta_from => 5.020001,
1020 changed => {
1021 },
1022 removed => {
1023 }
1024 },
2e3866c3
MH
1025 5.021009 => {
1026 delta_from => 5.021008,
1027 changed => {
c02a3722 1028 'encguess' => '1',
2e3866c3
MH
1029 },
1030 removed => {
1031 }
1032 },
ff4e8df2
S
1033 5.021010 => {
1034 delta_from => 5.021009,
1035 changed => {
1036 },
1037 removed => {
1038 }
1039 },
53902397
SH
1040 5.021011 => {
1041 delta_from => 5.02101,
1042 changed => {
1043 },
1044 removed => {
1045 }
1046 },
bff00388 1047 5.022000 => {
6bb5549b
SH
1048 delta_from => 5.021011,
1049 changed => {
1050 },
1051 removed => {
1052 }
1053 },
19aba073
RS
1054 5.023000 => {
1055 delta_from => 5.022000,
1056 changed => {
1057 },
1058 removed => {
1059 }
1060 },
b9e156a2
RS
1061 5.023001 => {
1062 delta_from => 5.023,
1063 changed => {
1064 },
1065 removed => {
1066 }
1067 },
923c264e
MH
1068 5.023002 => {
1069 delta_from => 5.023001,
1070 changed => {
1071 },
1072 removed => {
1073 }
1074 },
2490a830
SH
1075 5.020003 => {
1076 delta_from => 5.020002,
1077 changed => {
1078 },
1079 removed => {
1080 }
1081 },
c0bc7731
MH
1082 5.023003 => {
1083 delta_from => 5.023002,
1084 changed => {
1085 },
1086 removed => {
1087 }
1088 },
2d9b5f10
PM
1089 5.023004 => {
1090 delta_from => 5.023003,
1091 changed => {
1092 },
1093 removed => {
1094 }
1095 },
7792a6f5
SH
1096 5.023005 => {
1097 delta_from => 5.023004,
1098 changed => {
1099 },
1100 removed => {
1101 }
1102 },
83cfc1da
SH
1103 5.022001 => {
1104 delta_from => 5.022,
1105 changed => {
1106 },
1107 removed => {
1108 }
1109 },
7c294235
A
1110 5.023006 => {
1111 delta_from => 5.023005,
1112 changed => {
1113 },
1114 removed => {
1115 }
1116 },
5d4cc497
DG
1117 5.023007 => {
1118 delta_from => 5.023006,
1119 changed => {
1120 },
1121 removed => {
1122 }
1123 },
519be8b0
TC
1124 5.023008 => {
1125 delta_from => 5.023007,
1126 changed => {
1127 },
1128 removed => {
1129 }
1130 },
0515d31c
S
1131 5.023009 => {
1132 delta_from => 5.023008,
1133 changed => {
1134 },
1135 removed => {
1136 }
1137 },
e42cacf8
SH
1138 5.022002 => {
1139 delta_from => 5.022001,
1140 changed => {
1141 },
1142 removed => {
1143 }
1144 },
de1edec7 1145 5.024000 => {
d1fa969e
A
1146 delta_from => 5.023009,
1147 changed => {
1148 },
1149 removed => {
1150 }
1151 },
c800d8b3
RS
1152 5.025000 => {
1153 delta_from => 5.024000,
1154 changed => {
1155 },
1156 removed => {
1157 }
1158 },
4170737e 1159 5.025001 => {
f7a1e8ff 1160 delta_from => 5.025000,
4170737e
RS
1161 changed => {
1162 },
1163 removed => {
1164 }
1165 },
a55ca2cb
FC
1166 5.025002 => {
1167 delta_from => 5.025001,
1168 changed => {
1169 },
1170 removed => {
1171 }
1172 },
c338e234
MH
1173 5.025003 => {
1174 delta_from => 5.025002,
1175 changed => {
1176 },
1177 removed => {
1178 }
1179 },
dec2b171
SH
1180 5.025004 => {
1181 delta_from => 5.025003,
1182 changed => {
1183 },
1184 removed => {
1185 }
1186 },
9b3afcbd
CBW
1187 5.025005 => {
1188 delta_from => 5.025004,
1189 changed => {
1190 },
1191 removed => {
1192 }
1193 },
bc46539a
SL
1194 5.025006 => {
1195 delta_from => 5.025005,
1196 changed => {
1197 },
1198 removed => {
1199 }
1200 },
935d7564
AC
1201 5.025007 => {
1202 delta_from => 5.025006,
1203 changed => {
1204 },
1205 removed => {
1206 }
1207 },
d5584eb3
CG
1208 5.025008 => {
1209 delta_from => 5.025007,
1210 changed => {
1211 },
1212 removed => {
1213 }
1214 },
d202f2b8
SH
1215 5.022003 => {
1216 delta_from => 5.022002,
1217 changed => {
1218 },
1219 removed => {
1220 }
1221 },
1222 5.024001 => {
1223 delta_from => 5.024000,
1224 changed => {
1225 },
1226 removed => {
1227 }
1228 },
2b776413
JK
1229 5.025009 => {
1230 delta_from => 5.025008,
1231 changed => {
1232 },
1233 removed => {
ff2fd50f
A
1234 'c2ph' => 1,
1235 'pstruct' => 1,
2b776413
JK
1236 }
1237 },
f5294d12
A
1238 5.025010 => {
1239 delta_from => 5.025009,
1240 changed => {
1241 },
1242 removed => {
1243 }
1244 },
b25fc2a6
DM
1245 5.025011 => {
1246 delta_from => 5.025010,
1247 changed => {
1248 },
1249 removed => {
1250 }
1251 },
1798a06e 1252 5.025012 => {
fbe3f407
S
1253 delta_from => 5.025011,
1254 changed => {
1255 },
1256 removed => {
1257 }
1258 },
60454717
S
1259 5.026000 => {
1260 delta_from => 5.025012,
1261 changed => {
1262 },
1263 removed => {
1264 }
1265 },
753bd946
S
1266 5.027000 => {
1267 delta_from => 5.026000,
1268 changed => {
1269 },
1270 removed => {
1271 }
1272 },
bb5b17cd 1273 5.027001 => {
09b93956 1274 delta_from => 5.027000,
bb5b17cd
DM
1275 changed => {
1276 },
1277 removed => {
1278 }
1279 },
e029cc95
SH
1280 5.022004 => {
1281 delta_from => 5.022003,
1282 changed => {
1283 },
1284 removed => {
1285 }
1286 },
da0817c4
SH
1287 5.024002 => {
1288 delta_from => 5.024001,
1289 changed => {
1290 },
1291 removed => {
1292 }
1293 },
0db26723
EH
1294 5.027002 => {
1295 delta_from => 5.027001,
1296 changed => {
1297 },
1298 removed => {
1299 }
1300 },
56c35cf6
AC
1301 5.027003 => {
1302 delta_from => 5.027002,
1303 changed => {
1304 },
1305 removed => {
1306 }
1307 },
9f9332db
MH
1308 5.027004 => {
1309 delta_from => 5.027003,
1310 changed => {
1311 },
1312 removed => {
1313 }
1314 },
0ba9031a
SH
1315 5.024003 => {
1316 delta_from => 5.024002,
1317 changed => {
1318 },
1319 removed => {
1320 }
1321 },
1322 5.026001 => {
1323 delta_from => 5.026000,
1324 changed => {
1325 },
1326 removed => {
1327 }
1328 },
1967e407
JSA
1329 5.027005 => {
1330 delta_from => 5.027004,
1331 changed => {
1332 },
1333 removed => {
1334 }
1335 },
78425520
SH
1336 5.027006 => {
1337 delta_from => 5.027005,
1338 changed => {
1339 },
1340 removed => {
1341 }
1342 },
a67b31e3
KE
1343 5.027007 => {
1344 delta_from => 5.027006,
1345 changed => {
1346 },
1347 removed => {
1348 }
1349 },
946b6ed4
CBW
1350 5.027008 => {
1351 delta_from => 5.027007,
1352 changed => {
1353 },
1354 removed => {
1355 }
1356 },
3f4fae50
A
1357 5.027009 => {
1358 delta_from => 5.027008,
1359 changed => {
1360 },
1361 removed => {
1362 }
1363 },
4f01496f
S
1364 5.027010 => {
1365 delta_from => 5.027009,
1366 changed => {
1367 },
1368 removed => {
1369 }
1370 },
994c9c84
SH
1371 5.024004 => {
1372 delta_from => 5.024003,
1373 changed => {
1374 },
1375 removed => {
1376 }
1377 },
1378 5.026002 => {
1379 delta_from => 5.026001,
1380 changed => {
1381 },
1382 removed => {
1383 }
1384 },
26db1972
TR
1385 5.027011 => {
1386 delta_from => 5.027010,
1387 changed => {
1388 },
1389 removed => {
1390 }
1391 },
999f6786
S
1392 5.028000 => {
1393 delta_from => 5.027011,
1394 changed => {
1395 },
1396 removed => {
1397 }
1398 },
d361a1e6 1399 5.029000 => {
84208e00 1400 delta_from => 5.028,
d361a1e6
S
1401 changed => {
1402 },
1403 removed => {
1404 }
1405 },
c176529f 1406 5.029001 => {
0c114ddf 1407 delta_from => 5.029000,
c176529f
S
1408 changed => {
1409 },
1410 removed => {
1411 }
1412 },
c0036c4e
SH
1413 5.029002 => {
1414 delta_from => 5.029001,
1415 changed => {
1416 },
1417 removed => {
1418 }
1419 },
f01f0ce3
CBW
1420 5.029003 => {
1421 delta_from => 5.029002,
1422 changed => {
1423 },
1424 removed => {
1425 }
1426 },
b5492591
CBW
1427 5.029004 => {
1428 delta_from => 5.029003,
1429 changed => {
1430 },
1431 removed => {
1432 }
1433 },
9d68db48
AC
1434 5.029005 => {
1435 delta_from => 5.029004,
1436 changed => {
1437 },
1438 removed => {
1439 }
1440 },
0a26304a
SH
1441 5.026003 => {
1442 delta_from => 5.026002,
1443 changed => {
1444 },
1445 removed => {
1446 }
1447 },
1448 5.028001 => {
1449 delta_from => 5.028000,
1450 changed => {
1451 },
1452 removed => {
1453 }
1454 },
1d05df9a
KE
1455 5.029006 => {
1456 delta_from => 5.029005,
1457 changed => {
1458 },
1459 removed => {
1460 }
1461 },
3f4d3763
A
1462 5.029007 => {
1463 delta_from => 5.029006,
1464 changed => {
1465 },
1466 removed => {
1467 }
1468 },
78073bbc
A
1469 5.029008 => {
1470 delta_from => 5.029007,
1471 changed => {
1472 },
1473 removed => {
1474 }
1475 },
906ab9d7
N
1476 5.029009 => {
1477 delta_from => 5.029008,
1478 changed => {
1479 },
1480 removed => {
1481 }
1482 },
c0bdffd6
SH
1483 5.028002 => {
1484 delta_from => 5.028001,
1485 changed => {
1486 },
1487 removed => {
1488 }
1489 },
50691e40
ZE
1490 5.029010 => {
1491 delta_from => 5.029009,
1492 changed => {
1493 },
1494 removed => {
1495 }
1496 },
0f3a31ce 1497 5.030000 => {
5ad71949 1498 delta_from => 5.029010,
0f3a31ce
S
1499 changed => {
1500 },
1501 removed => {
1502 }
1503 },
96fe4353
S
1504 5.031000 => {
1505 delta_from => 5.030000,
1506 changed => {
1507 },
1508 removed => {
1509 }
1510 },
e4f0ee67
CBW
1511);
1512
8bbcf42b 1513%utilities = Module::CoreList::_undelta(\%delta);
e4f0ee67
CBW
1514
1515# Create aliases with trailing zeros for $] use
1516
1517$utilities{'5.000'} = $utilities{5};
1518
1519_create_aliases(\%utilities);
1520
1521sub _create_aliases {
1522 my ($hash) = @_;
1523
1524 for my $version (keys %$hash) {
1525 next unless $version >= 5.010;
1526
1527 my $padded = sprintf "%0.6f", $version;
1528
1529 # If the version in string form isn't the same as the numeric version,
1530 # alias it.
1531 if ($padded ne $version && $version == $padded) {
1532 $hash->{$padded} = $hash->{$version};
1533 }
1534 }
1535}
1536
1537'foo';
7a0b45a1
CBW
1538
1539=pod
1540
1541=head1 NAME
1542
1543Module::CoreList::Utils - what utilities shipped with versions of perl
1544
1545=head1 SYNOPSIS
1546
1547 use Module::CoreList::Utils;
1548
1549 print $Module::CoreList::Utils::utilities{5.009003}{ptar}; # prints 1
1550
e46aa1dd
KW
1551 print Module::CoreList::Utils->first_release('corelist');
1552 # prints 5.008009
1553
1554 print Module::CoreList::Utils->first_release_by_date('corelist');
1555 # prints 5.009002
7a0b45a1
CBW
1556
1557=head1 DESCRIPTION
1558
1559Module::CoreList::Utils provides information on which core and dual-life utilities shipped
1560with each version of L<perl>.
1561
1562It provides a number of mechanisms for querying this information.
1563
1564There is a functional programming API available for programmers to query
1565information.
1566
1567Programmers may also query the contained hash structure to find relevant
1568information.
1569
1570=head1 FUNCTIONS API
1571
1572These are the functions that are available, they may either be called as functions or class methods:
1573
1574 Module::CoreList::Utils::first_release('corelist'); # as a function
1575
1576 Module::CoreList::Utils->first_release('corelist'); # class method
1577
1578=over
1579
1580=item C<utilities>
1581
1582Requires a perl version as an argument, returns a list of utilities that shipped with
1583that version of perl, or undef/empty list if that perl doesn't exist.
1584
1585=item C<first_release( UTILITY )>
1586
1587Requires a UTILITY name as an argument, returns the perl version when that utility first
1588appeared in core as ordered by perl version number or undef ( in scalar context )
1589or an empty list ( in list context ) if that utility is not in core.
1590
1591=item C<first_release_by_date( UTILITY )>
1592
1593Requires a UTILITY name as an argument, returns the perl version when that utility first
1594appeared in core as ordered by release date or undef ( in scalar context )
1595or an empty list ( in list context ) if that utility is not in core.
1596
1597=item C<removed_from( UTILITY )>
1598
1599Takes a UTILITY name as an argument, returns the first perl version where that utility
1600was removed from core. Returns undef if the given utility was never in core or remains
1601in core.
1602
1603=item C<removed_from_by_date( UTILITY )>
1604
1605Takes a UTILITY name as an argument, returns the first perl version by release date where that
1606utility was removed from core. Returns undef if the given utility was never in core or remains
1607in core.
1608
1609=back
1610
1611=head1 DATA STRUCTURES
1612
1613These are the hash data structures that are available:
1614
1615=over
1616
1617=item C<%Module::CoreList::Utils::utilities>
1618
1619A hash of hashes that is keyed on perl version as indicated
1620in $]. The second level hash is utility / defined pairs.
1621
1622=back
1623
1624=head1 AUTHOR
1625
1626Chris C<BinGOs> Williams <chris@bingosnet.co.uk>
1627
1628Currently maintained by the perl 5 porters E<lt>perl5-porters@perl.orgE<gt>.
1629
1630This module is the result of archaeology undertaken during QA Hackathon
1631in Lancaster, April 2013.
1632
1633=head1 LICENSE
1634
1635Copyright (C) 2013 Chris Williams. All Rights Reserved.
1636
1637This module is free software; you can redistribute it and/or modify it
1638under the same terms as Perl itself.
1639
1640=head1 SEE ALSO
1641
1642L<corelist>, L<Module::CoreList>, L<perl>, L<http://perlpunks.de/corelist>
1643
1644=cut