1BISECT_PERL_USING_GIT(1U)ser Contributed Perl DocumentatiBoInSECT_PERL_USING_GIT(1)
2
3
4

NAME

6       bisect_perl_using_git - Help you to bisect Perl
7

DESCRIPTION

9       bisect_perl_using_git helps you to bisect Perl. This helps you to find
10       at what commit a change happened in Perl. You can check for file
11       addition and removal - it checks out various commits of Perl and finds
12       out which change was involved. You can also check for a difference in
13       Perl evalutation, in which case it will check out various commits of
14       Perl, compile them and finds out which change was involved - this is
15       more CPU intensive and you must install ccache.
16
17       First you must download the current Git repository of Perl, so execute
18       something like the following:
19
20         mkdir git
21         cd git
22         git clone git://perl5.git.perl.org/perl.git perl-git
23         cd perl-git
24
25       Now, I happen to know that the autodie pragma was added sometime in
26       December 2008, but I would like to know which commit. Let's find out
27       some commits at the beginning and the end of that month, and see when
28       lib/autodie.pm was added:
29
30         # git log --before=2008-12-01 -n 1
31         # 1409bc0658469580630ba458c85fe9cc3cb2d78c
32         # git log --before=2008-12-31 -n 1
33         # 675b0f774d374f6951c02c6463c64a746ad46acd
34         git bisect reset
35         git bisect start
36         git bisect good 1409bc0658469580630ba458c85fe9cc3cb2d78c
37         git bisect bad 675b0f774d374f6951c02c6463c64a746ad46acd
38         # Bisecting: 114 revisions left to test after this
39         git bisect run bisect_perl_using_git --action file_added \
40           --filename lib/autodie.pm
41         # ... after checking out 10 trees and about 10 seconds, it says:
42         # 0b09a93a0cec34bc5d1740400c4ed9500d2f1dbe is first bad commit
43         # commit 0b09a93a0cec34bc5d1740400c4ed9500d2f1dbe
44         # Author: Paul Fenwick <pjf@perltraining.com.au>
45         # Date:   Sat Dec 20 22:21:02 2008 +0900
46         #
47         # git-flavoured autodie 1.997 patch
48         # G'day p5p,
49         # ...
50         git bisect reset
51
52       Sometime after June 2009, ext/Storable/MANIFEST was removed from Perl.
53       Let's find out which commit removed it:
54
55         # git log --before=2009-06-01 -n 1
56         # 20f91e418dfa8bdf6cf78614bfebebc28a7613ee
57         git bisect reset
58         git bisect start
59         git bisect good 20f91e418dfa8bdf6cf78614bfebebc28a7613ee
60         git bisect bad HEAD
61         # Bisecting: 266 revisions left to test after this
62         git bisect run bisect_perl_using_git --action file_removed \
63           --filename ext/Storable/MANIFEST
64         # ... after checking out 11 trees and about 10 seconds, it says:
65         # 2868e48536e3f471e5ba483466cc1bc53caff5a is first bad commit
66         # commit e2868e48536e3f471e5ba483466cc1bc53caff5a
67         # Author: David Mitchell <davem@iabyn.com>
68         # Date:   Fri Jun 12 17:24:43 2009 +0100
69         #
70         #    remove ext/Storable/MANIFEST; its out of date related to CPAN
71         #    and for most dual-life modules we don't bother including it in blead
72         # ...
73         git bisect reset
74
75       Now for a real bug report, where some code that works in Perl 5.8.8 and
76       should work in Perl 5.10.0 but does not:
77
78         http://rt.perl.org/rt3/Public/Bug/Display.html?id=62056
79
80       We create a ~/testcase.pl which contains the following:
81
82         #!perl
83         use strict;
84         use warnings;
85         use charnames ':full';
86         my $x;
87         m/$x\N{START OF HEADING}/
88
89       And then run:
90
91         git bisect reset
92         git bisect start
93         git bisect good perl-5.8.8
94         git bisect bad perl-5.10.0
95         # Bisecting: 4041 revisions left to test after this
96         git bisect run bisect_perl_using_git --action perl_fails \
97           --filename ~/testcase.pl
98         # ... after checking out 16 trees and about one hour, it says:
99         # fc8cd66c26827f6c2ee1aa00ab2d3b3c320a4a28 is first bad commit
100         # commit fc8cd66c26827f6c2ee1aa00ab2d3b3c320a4a28
101         # Author: Yves Orton <demerphq@gmail.com>
102         # Date:   Tue Sep 19 03:37:19 2006 +0200
103         #
104         #    Re: \N{...} in regular expression [PATCH]
105         # ...
106         git bisect reset
107

AUTHOR

109       Leon Brocard, "<acme@astray.com>"
110
112       Copyright (C) 2009, Leon Brocard
113

LICENSE

115       This module is free software; you can redistribute it or modify it
116       under the same terms as Perl itself.
117
118
119
120perl v5.38.0                      2023-07-20          BISECT_PERL_USING_GIT(1)
Impressum