Phil described that in

    // SPDX-License-Identifier: 0BSD or BSL-1.0 or MIT-0

only the first item '0BSD' is discovered.

Current usage is to add parentheses. In

    // SPDX-License-Identifier: ( 0BSD or BSL-1.0 or MIT-0 )

no item is discovered at all.

For stepping over the leading parenthesis the following diff could be used as a fix:

--- Regexp/Pattern/License.pm   2024-08-21 21:12:10.000000000 +0200
+++ Regexp/Pattern/License.pm   2025-11-20 22:32:20.097783678 +0100
@@ -1721,7 +1721,7 @@
        ],

        'pat.alt.subject.trait' =>
-               '(?P<_license_label_spdx>SPDX[-]License[-]Identifier[:] )',
+ '(?P<_license_label_spdx>SPDX[-]License[-]Identifier[:] [ \(]*)',
 };

 $RE{license_label_trove} = {

Furthermore invalid SPDX identifiers are accepted:

    // SPDX-License-Identifier: gnu-general-public-license-v2
    // SPDX-License-Identifier: GNUGPLv2

Best regards

Heinrich

Reply via email to