<commit_before># TODO:
# * Command-line parsing
#   * Allow both = and space before argument of double-dash args
#   * Comma-separated list values
#   * Allow exact Perl 6 forms, quoted away from shell
# * Fix remaining XXXX

my sub MAIN_HELPER($IN-as-ARGSFILES) {
    # Do we have a MAIN at all?
    my $m = callframe(1).my<&MAIN>;
    return 0 unless $m;

    my %SUB-MAIN-OPTS  := %*SUB-MAIN-OPTS // {};
    my $no-named-after := nqp::isfalse(%SUB-MAIN-OPTS<named-anywhere>);

    sub thevalue(\a) {
        ((my $type := ::(a)) andthen Metamodel::EnumHOW.ACCEPTS($type.HOW))
          ?? $type
          !! val(a)<commit_msg>Revert "Remove apparently unused/undocumented param from MAIN_HELPER"<commit_after># TODO:
# * Command-line parsing
#   * Allow both = and space before argument of double-dash args
#   * Comma-separated list values
#   * Allow exact Perl 6 forms, quoted away from shell
# * Fix remaining XXXX

my sub MAIN_HELPER($IN-as-ARGSFILES, $retval = 0) {
    # Do we have a MAIN at all?
    my $m = callframe(1).my<&MAIN>;
    return $retval unless $m;

    my %SUB-MAIN-OPTS  := %*SUB-MAIN-OPTS // {};
    my $no-named-after := nqp::isfalse(%SUB-MAIN-OPTS<named-anywhere>);

    sub thevalue(\a) {
        ((my $type := ::(a)) andthen Metamodel::EnumHOW.ACCEPTS($type.HOW))
          ?? $type
          !! val(a)
{'fraction_non_alphanumeric': 0.1522880720180045, 'fraction_numerical': 0.00450112528132033, 'mean_word_length': 2.9584569732937687, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1257114', 'n_tokens_mistral': 484, 'n_tokens_neox': 461, 'n_words': 127}