[packages/perl] package version (following name) extraction from system perl.prov
atler
atler at pld-linux.org
Wed Jul 5 14:07:46 CEST 2023
commit 2005d3dc6926fd45f239ce5ce6ba1e61b63449d0
Author: Jan Palus <atler at pld-linux.org>
Date: Wed Jul 5 13:12:33 2023 +0200
package version (following name) extraction from system perl.prov
perl.prov | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/perl.prov b/perl.prov
index dc1e310..64b6981 100644
--- a/perl.prov
+++ b/perl.prov
@@ -92,13 +92,14 @@ sub process_file {
# search for the package name
if (
- !defined $package
- && ( my ($pack) = m/^\s*(?:\{\s*)?package\s+([_:a-zA-Z0-9]+?):*\s*;/ )
+ (!defined $package || !defined $version)
+ && ( my ($pack, $ver) = m/^\s*(?:\{\s*)?package\s+([_:a-zA-Z0-9]+?)\s*(?:v?([0-9_.]+)\s*)?[;{]/)
&& $1 ne 'main'
&& match_the_path( $file, $1 )
)
{
$package = $pack;
+ $version = $ver;
}
if ( defined $package && $package == 'Getopt::Long' && /([\$*])(([\w\:\']*)\bVERSION_STRING)\b.*\=/ ) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl.git/commitdiff/591f66a57af5f4827654cf42a3bfec51022a96c0
More information about the pld-cvs-commit
mailing list