<commit_before>#!/usr/bin/perl
use strict;
use warnings;
use autodie;
use Cwd 'getcwd';
use Cwd 'abs_path';
use File::Basename;

# pkgname => { build => build, ref => ref, arches => [arches] }
my %pkgs;
# runtime and buildroot package lists
my (@runtime, @buildroot);

my $fh;

sub HELP_MESSAGE {
    print "Usage: mkmmd.pl path [local_base_runtime_module_repo]\n";
    exit;
}

sub getbuild {
    return $_[0] =~ s/^\d+:(.+)\.[^.]+$/$1/r;
}

sub getname {
    return $_[0] =~ s/^(.+)-[^-]+-[^-]+$/$1/r;<commit_msg>Make make_modulemd.pl compatibles with NEVRAs<commit_after>#!/usr/bin/perl
use strict;
use warnings;
use autodie;
use Cwd 'getcwd';
use Cwd 'abs_path';
use File::Basename;

# pkgname => { build => build, ref => ref, arches => [arches] }
my %pkgs;
# runtime and buildroot package lists
my (@runtime, @buildroot);

my $fh;

sub HELP_MESSAGE {
    print "Usage: mkmmd.pl path [local_base_runtime_module_repo]\n";
    exit;
}

sub getbuild {
    return $_[0] =~ s/^(.+?)-(?:\d+:)?([^-]+-[^-]+)\.[^.]+$/$1-$2/r;
}

sub getname {
    return $_[0] =~ s/^(.+)-[^-]+-[^-]+$/$1/r;
{'fraction_non_alphanumeric': 0.2313364055299539, 'fraction_numerical': 0.008294930875576038, 'mean_word_length': 3.7841409691629955, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5064063', 'n_tokens_mistral': 472, 'n_tokens_neox': 447, 'n_words': 107}