Git development
 help / color / mirror / Atom feed
* [PATCH] CodingGuidelines: update the required Perl version
@ 2026-11-01 18:58 Tuomas Ahola
  2026-11-02  4:08 ` Junio C Hamano
  2026-11-02  6:41 ` Junio C Hamano
  0 siblings, 2 replies; 6+ messages in thread
From: Tuomas Ahola @ 2026-11-01 18:58 UTC (permalink / raw)
  To: git; +Cc: Tuomas Ahola

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] CodingGuidelines: update the required Perl version
  2026-11-01 18:58 [PATCH] CodingGuidelines: update the required Perl version Tuomas Ahola
@ 2026-11-02  4:08 ` Junio C Hamano
  2026-11-04 19:34   ` Tuomas Ahola
  2026-11-02  6:41 ` Junio C Hamano
  1 sibling, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2026-11-02  4:08 UTC (permalink / raw)
  To: Tuomas Ahola; +Cc: git

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;

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] CodingGuidelines: update the required Perl version
  2026-11-01 18:58 [PATCH] CodingGuidelines: update the required Perl version Tuomas Ahola
  2026-11-02  4:08 ` Junio C Hamano
@ 2026-11-02  6:41 ` Junio C Hamano
  2026-11-04 18:59   ` Junio C Hamano
  1 sibling, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2026-11-02  6:41 UTC (permalink / raw)
  To: Tuomas Ahola; +Cc: git

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] CodingGuidelines: update the required Perl version
  2026-11-02  6:41 ` Junio C Hamano
@ 2026-11-04 18:59   ` Junio C Hamano
  0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2026-11-04 18:59 UTC (permalink / raw)
  To: Tuomas Ahola; +Cc: git

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/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] CodingGuidelines: update the required Perl version
  2026-11-02  4:08 ` Junio C Hamano
@ 2026-11-04 19:34   ` Tuomas Ahola
  2026-11-04 19:56     ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Tuomas Ahola @ 2026-11-04 19:34 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] CodingGuidelines: update the required Perl version
  2026-11-04 19:34   ` Tuomas Ahola
@ 2026-11-04 19:56     ` Junio C Hamano
  0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2026-11-04 19:56 UTC (permalink / raw)
  To: Tuomas Ahola; +Cc: git, brian m. carlson

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-04 19:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-01 18:58 [PATCH] CodingGuidelines: update the required Perl version Tuomas Ahola
2026-11-02  4:08 ` Junio C Hamano
2026-11-04 19:34   ` Tuomas Ahola
2026-11-04 19:56     ` Junio C Hamano
2026-11-02  6:41 ` Junio C Hamano
2026-11-04 18:59   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox