Thread View: linux.kernel.git
10 messages
10 total messages
Started by Tuomas Ahola
Sun, 01 Nov 2026 18:58
[PATCH] CodingGuidelines: update the required Perl version
Author: Tuomas Ahola
Date: Sun, 01 Nov 2026 18:58
Date: Sun, 01 Nov 2026 18:58
26 lines
10024 bytes
10024 bytes
702d8c1f3b (Require Perl 5.26.0, 2024-10-23) bumped Git's Perl version
requirement. Update CodingGuidelines accordingly.
Signed-off-by: Tuomas Ahola <taahol@utu.fi>
---
Documentation/CodingGuidelines | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index c06f5d3071..9b17ab34db 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -703,7 +703,7 @@ For Perl programs:
- Most of the C guidelines above apply.
- - We try to support Perl 5.8.1 and later ("use Perl 5.008001").
+ - We try to support Perl 5.26.0 and later ("use Perl 5.026000").
- use strict and use warnings are strongly preferred.
base-commit: a018953688f1b10bddf91bff8747068f5f4746a4
--
ta/coding-guidelines-perl-version
Re: [PATCH] CodingGuidelines: update the required Perl version
Author: Junio C Hamano
Date: Mon, 02 Nov 2026 04:08
Date: Mon, 02 Nov 2026 04:08
58 lines
14385 bytes
14385 bytes
Tuomas Ahola <taahol@utu.fi> writes:
> 702d8c1f3b (Require Perl 5.26.0, 2024-10-23) bumped Git's Perl version
> requirement. Update CodingGuidelines accordingly.
>
> Signed-off-by: Tuomas Ahola <taahol@utu.fi>
> ---
> Documentation/CodingGuidelines | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
> index c06f5d3071..9b17ab34db 100644
> --- a/Documentation/CodingGuidelines
> +++ b/Documentation/CodingGuidelines
> @@ -703,7 +703,7 @@ For Perl programs:
>
> - Most of the C guidelines above apply.
>
> - - We try to support Perl 5.8.1 and later ("use Perl 5.008001").
> + - We try to support Perl 5.26.0 and later ("use Perl 5.026000").
Is this in line with what 702d8c1f3b did? Shouldn't we say
> + - We try to support Perl 5.26.0 and later ("require v5.26").
"require v5.26" instead?
commit 702d8c1f3b5377a64670b0f22add157b0bfc33dd
Author: brian m. carlson <sandals@crustytoothpaste.net>
Date: Wed Oct 23 00:45:59 2024 +0000
Require Perl 5.26.0
...
This change was made with the following one-liner, which intentionally
excludes modifying the vendored modules we include to avoid conflicts:
git grep -l 'use 5.008001' |
grep -v 'LoadCPAN/' |
xargs perl -pi -e 's/use 5.008001/require v5.26/'
Use require instead of use to avoid changing the behavior as the latter
enables features and the former does not.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
diff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-highlight/DiffHighlight.pm
index 636add6968..3d061bc0b7 100644
--- a/contrib/diff-highlight/DiffHighlight.pm
+++ b/contrib/diff-highlight/DiffHighlight.pm
@@ -1,6 +1,6 @@
package DiffHighlight;
-use 5.008001;
+require v5.26;
use warnings FATAL => 'all';
use strict;
Re: [PATCH] CodingGuidelines: update the required Perl version
Author: Junio C Hamano
Date: Mon, 02 Nov 2026 06:41
Date: Mon, 02 Nov 2026 06:41
29 lines
13274 bytes
13274 bytes
Tuomas Ahola <taahol@utu.fi> writes:
> 702d8c1f3b (Require Perl 5.26.0, 2024-10-23) bumped Git's Perl version
> requirement. Update CodingGuidelines accordingly.
>
> Signed-off-by: Tuomas Ahola <taahol@utu.fi>
> ---
> Documentation/CodingGuidelines | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Makes sense. Thanks.
>
> diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
> index c06f5d3071..9b17ab34db 100644
> --- a/Documentation/CodingGuidelines
> +++ b/Documentation/CodingGuidelines
> @@ -703,7 +703,7 @@ For Perl programs:
>
> - Most of the C guidelines above apply.
>
> - - We try to support Perl 5.8.1 and later ("use Perl 5.008001").
> + - We try to support Perl 5.26.0 and later ("use Perl 5.026000").
>
> - use strict and use warnings are strongly preferred.
>
>
> base-commit: a018953688f1b10bddf91bff8747068f5f4746a4
Re: [PATCH] CodingGuidelines: update the required Perl version
Author: Junio C Hamano
Date: Wed, 04 Nov 2026 18:59
Date: Wed, 04 Nov 2026 18:59
20 lines
12964 bytes
12964 bytes
Junio C Hamano <gitster@pobox.com> writes: > Tuomas Ahola <taahol@utu.fi> writes: > >> 702d8c1f3b (Require Perl 5.26.0, 2024-10-23) bumped Git's Perl version >> requirement. Update CodingGuidelines accordingly. >> >> Signed-off-by: Tuomas Ahola <taahol@utu.fi> >> --- >> Documentation/CodingGuidelines | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > Makes sense. Thanks. Oh, no, not so fast. I'll mark the topic as "Waiting for response". https://lore.kernel.org/git/xmqqjymvooyn.fsf@gitster.g/
Re: [PATCH] CodingGuidelines: update the required Perl version
Author: Tuomas Ahola
Date: Wed, 04 Nov 2026 19:34
Date: Wed, 04 Nov 2026 19:34
45 lines
10720 bytes
10720 bytes
Junio C Hamano <gitster@pobox.com> wrote:
> Tuomas Ahola <taahol@utu.fi> writes:
>
> > 702d8c1f3b (Require Perl 5.26.0, 2024-10-23) bumped Git's Perl version
> > requirement. Update CodingGuidelines accordingly.
> >
> > Signed-off-by: Tuomas Ahola <taahol@utu.fi>
> > ---
> > Documentation/CodingGuidelines | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
> > index c06f5d3071..9b17ab34db 100644
> > --- a/Documentation/CodingGuidelines
> > +++ b/Documentation/CodingGuidelines
> > @@ -703,7 +703,7 @@ For Perl programs:
> >
> > - Most of the C guidelines above apply.
> >
> > - - We try to support Perl 5.8.1 and later ("use Perl 5.008001").
> > + - We try to support Perl 5.26.0 and later ("use Perl 5.026000").
>
> Is this in line with what 702d8c1f3b did? Shouldn't we say
>
> > + - We try to support Perl 5.26.0 and later ("require v5.26").
>
> "require v5.26" instead?
>
Frankly, I don't make head nor tail of such Perl minutiae. I would find that
parenthetical much more useful if it told exactly when we are supposed to use
such incantations.
For example:
- All new code should carry the line "require v5.26".
or
- Please consider adding "require v5.26" whenever appropriate.
I'm not really sure how to proceed with this. One option is of course to adopt
your suggestion and call it a day.
Re: [PATCH] CodingGuidelines: update the required Perl version
Author: Junio C Hamano
Date: Wed, 04 Nov 2026 19:56
Date: Wed, 04 Nov 2026 19:56
72 lines
15126 bytes
15126 bytes
Tuomas Ahola <taahol@utu.fi> writes:
> Junio C Hamano <gitster@pobox.com> wrote:
>
>> Tuomas Ahola <taahol@utu.fi> writes:
>>
>> > 702d8c1f3b (Require Perl 5.26.0, 2024-10-23) bumped Git's Perl version
>> > requirement. Update CodingGuidelines accordingly.
>> >
>> > Signed-off-by: Tuomas Ahola <taahol@utu.fi>
>> > ---
>> > Documentation/CodingGuidelines | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
>> > index c06f5d3071..9b17ab34db 100644
>> > --- a/Documentation/CodingGuidelines
>> > +++ b/Documentation/CodingGuidelines
>> > @@ -703,7 +703,7 @@ For Perl programs:
>> >
>> > - Most of the C guidelines above apply.
>> >
>> > - - We try to support Perl 5.8.1 and later ("use Perl 5.008001").
>> > + - We try to support Perl 5.26.0 and later ("use Perl 5.026000").
>>
>> Is this in line with what 702d8c1f3b did? Shouldn't we say
>>
>> > + - We try to support Perl 5.26.0 and later ("require v5.26").
>>
>> "require v5.26" instead?
>>
>
> Frankly, I don't make head nor tail of such Perl minutiae. I would find that
> parenthetical much more useful if it told exactly when we are supposed to use
> such incantations.
I do not claim to be intimately familiar, but you can consult the
commit you cited as the reason why you decided to make this update.
$ git show 702d8c1f3b
commit 702d8c1f3b5377a64670b0f22add157b0bfc33dd
Author: brian m. carlson <sandals@crustytoothpaste.net>
Date: Wed Oct 23 00:45:59 2024 +0000
Require Perl 5.26.0
Our platform support policy states that we require "versions of
...
Use require instead of use to avoid changing the behavior as the latter
enables features and the former does not.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
...
diff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-highlight/DiffHighlight.pm
index 636add6968..3d061bc0b7 100644
--- a/contrib/diff-highlight/DiffHighlight.pm
+++ b/contrib/diff-highlight/DiffHighlight.pm
@@ -1,6 +1,6 @@
package DiffHighlight;
-use 5.008001;
+require v5.26;
use warnings FATAL => 'all';
use strict;
It looks to me that the "parenthetical" you called was designed to
be useful by telling you what to have near the top of your Perl
source files. Replacing it with "require v5.26" is exactly in line
with that, I would think.
Re: [PATCH] CodingGuidelines: update the required Perl version
Author: "brian m. carlson"
Date: Wed, 04 Nov 2026 22:28
Date: Wed, 04 Nov 2026 22:28
94 lines
12509 bytes
12509 bytes
--UULTjyjSpjWJFQPf
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On 2026-11-04 at 19:56:57, Junio C Hamano wrote:
> Tuomas Ahola <taahol@utu.fi> writes:
>=20
> > Junio C Hamano <gitster@pobox.com> wrote:
> >
> >> Tuomas Ahola <taahol@utu.fi> writes:
> >>=20
> >> > - - We try to support Perl 5.8.1 and later ("use Perl 5.008001").
> >> > + - We try to support Perl 5.26.0 and later ("use Perl 5.026000").
> >>=20
> >> Is this in line with what 702d8c1f3b did? Shouldn't we say
> >>=20
> >> > + - We try to support Perl 5.26.0 and later ("require v5.26").
> >>=20
> >> "require v5.26" instead?
> >>=20
> >
> > Frankly, I don't make head nor tail of such Perl minutiae. I would fin=
d that
> > parenthetical much more useful if it told exactly when we are supposed =
to use
> > such incantations.
>=20
> I do not claim to be intimately familiar, but you can consult the
> commit you cited as the reason why you decided to make this update.
>=20
> $ git show 702d8c1f3b
> commit 702d8c1f3b5377a64670b0f22add157b0bfc33dd
> Author: brian m. carlson <sandals@crustytoothpaste.net>
> Date: Wed Oct 23 00:45:59 2024 +0000
>=20
> Require Perl 5.26.0
>=20
> Our platform support policy states that we require "versions of
> ...
> Use require instead of use to avoid changing the behavior as the =
latter
> enables features and the former does not.
>=20
> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
> Signed-off-by: Taylor Blau <me@ttaylorr.com>
>=20
> ...
> diff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-h=
ighlight/DiffHighlight.pm
> index 636add6968..3d061bc0b7 100644
> --- a/contrib/diff-highlight/DiffHighlight.pm
> +++ b/contrib/diff-highlight/DiffHighlight.pm
> @@ -1,6 +1,6 @@
> package DiffHighlight;
>=20
> -use 5.008001;
> +require v5.26;
> use warnings FATAL =3D> 'all';
> use strict;
>=20
> It looks to me that the "parenthetical" you called was designed to
> be useful by telling you what to have near the top of your Perl
> source files. Replacing it with "require v5.26" is exactly in line
> with that, I would think.
As mentioned above, you want `require`, not `use`, with Perl versions.
The latter enables the relevant features, which include Unicode strings
as of 5.12, and that will change the behaviour of our code in ways we're
probably not expecting. That didn't happen in 5.8.1 because features
didn't exist, so the `use` for that version was okay.
You effectively always want `require v5.26` or something equivalent such
as `require 5.026` in our codebase. The former is nicer to read,
though.
--=20
brian m. carlson (they/them)
Toronto, Ontario, CA
Speaking for myself only
--UULTjyjSpjWJFQPf
Content-Type: application/pgp-signature; name=signature.asc
-----BEGIN PGP SIGNATURE-----
wr0EABYKAG8FgmrrsY4JEHwMSWKIh6KBRxQAAAAAAB4AIHNhbHRAbm90YXRpb25z
LnNlcXVvaWEtcGdwLm9yZy7qNj3FUGtPB9T8jd/ge5QBF+GekbnX4mdkxFQu25Xy
FiEECCzmip28ZfuD0cORfAxJYoiHooEAALn3AQDF47uK9lJSKSXkEnuz1iEGdf2E
kiAMPIeXomBJhx3jKgD/TXub9VDGtaxcT4y+D/1HLjzpTeFdL1hknqKdadHPVAI=
=pvkn
-----END PGP SIGNATURE-----
--UULTjyjSpjWJFQPf--
Re: [PATCH] CodingGuidelines: update the required Perl version
Author: Junio C Hamano
Date: Thu, 05 Nov 2026 17:42
Date: Thu, 05 Nov 2026 17:42
36 lines
14045 bytes
14045 bytes
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
> On 2026-11-04 at 19:56:57, Junio C Hamano wrote:
>> Tuomas Ahola <taahol@utu.fi> writes:
>>
>> > Junio C Hamano <gitster@pobox.com> wrote:
>> >
>> >> Tuomas Ahola <taahol@utu.fi> writes:
>> >>
>> >> > - - We try to support Perl 5.8.1 and later ("use Perl 5.008001").
>> >> > + - We try to support Perl 5.26.0 and later ("use Perl 5.026000").
>> >>
>> >> Is this in line with what 702d8c1f3b did? Shouldn't we say
>> >>
>> >> > + - We try to support Perl 5.26.0 and later ("require v5.26").
>> >>
>> >> "require v5.26" instead?
>> ...
>> It looks to me that the "parenthetical" you called was designed to
>> be useful by telling you what to have near the top of your Perl
>> source files. Replacing it with "require v5.26" is exactly in line
>> with that, I would think.
>
> As mentioned above, you want `require`, not `use`, with Perl versions.
> The latter enables the relevant features, which include Unicode strings
> as of 5.12, and that will change the behaviour of our code in ways we're
> probably not expecting. That didn't happen in 5.8.1 because features
> didn't exist, so the `use` for that version was okay.
>
> You effectively always want `require v5.26` or something equivalent such
> as `require 5.026` in our codebase. The former is nicer to read,
> though.
Thanks. Let's see the final version that can immediately be marked
as ready for 'next' then.
[PATCH v2] CodingGuidelines: update the required Perl version
Author: Tuomas Ahola
Date: Thu, 05 Nov 2026 18:39
Date: Thu, 05 Nov 2026 18:39
52 lines
11565 bytes
11565 bytes
702d8c1f3b (Require Perl 5.26.0, 2024-10-23) bumped Git's Perl version
requirement and migrated the codebase to use "require vx.y.z" in lieu
of "use x.y_z". Update CodingGuidelines accordingly.
Helped-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Tuomas Ahola <taahol@utu.fi>
---
Intervall-diff mot v1:
1: d18ca7697d ! 1: 70e2656643 CodingGuidelines: update the required Perl version
@@ Commit message
CodingGuidelines: update the required Perl version
702d8c1f3b (Require Perl 5.26.0, 2024-10-23) bumped Git's Perl version
- requirement. Update CodingGuidelines accordingly.
+ requirement and migrated the codebase to use "require vx.y.z" in lieu
+ of "use x.y_z". Update CodingGuidelines accordingly.
+ Helped-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Tuomas Ahola <taahol@utu.fi>
## Documentation/CodingGuidelines ##
@@ Documentation/CodingGuidelines: For Perl programs:
- Most of the C guidelines above apply.
- - We try to support Perl 5.8.1 and later ("use Perl 5.008001").
-+ - We try to support Perl 5.26.0 and later ("use Perl 5.026000").
++ - We try to support Perl 5.26.0 and later ("require v5.26").
- use strict and use warnings are strongly preferred.
Documentation/CodingGuidelines | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index c06f5d3071..bc0470c154 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -703,7 +703,7 @@ For Perl programs:
- Most of the C guidelines above apply.
- - We try to support Perl 5.8.1 and later ("use Perl 5.008001").
+ - We try to support Perl 5.26.0 and later ("require v5.26").
- use strict and use warnings are strongly preferred.
base-commit: a018953688f1b10bddf91bff8747068f5f4746a4
--
ta/cg-require-perl-5.26.0
Re: [PATCH v2] CodingGuidelines: update the required Perl version
Author: Junio C Hamano
Date: Thu, 05 Nov 2026 18:45
Date: Thu, 05 Nov 2026 18:45
24 lines
13357 bytes
13357 bytes
Tuomas Ahola <taahol@utu.fi> writes:
> 702d8c1f3b (Require Perl 5.26.0, 2024-10-23) bumped Git's Perl version
> requirement and migrated the codebase to use "require vx.y.z" in lieu
> of "use x.y_z". Update CodingGuidelines accordingly.
>
> Helped-by: brian m. carlson <sandals@crustytoothpaste.net>
> Signed-off-by: Tuomas Ahola <taahol@utu.fi>
> ---
> diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
> index c06f5d3071..bc0470c154 100644
> --- a/Documentation/CodingGuidelines
> +++ b/Documentation/CodingGuidelines
> @@ -703,7 +703,7 @@ For Perl programs:
>
> - Most of the C guidelines above apply.
>
> - - We try to support Perl 5.8.1 and later ("use Perl 5.008001").
> + - We try to support Perl 5.26.0 and later ("require v5.26").
Looks good. Will queue.
Thanks.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads