<commit_before>my class Enum does Associative {
    has $.key;
    has $.value;

    method new(:$key, Mu :$value) { nqp::create(self).BUILD($key, $value) }
    method BUILD($!key, Mu $!value) { self }

    multi method ACCEPTS(Enum:D: Associative:D $topic) {
        $topic{$!key} ~~ $!value
    }

    multi method ACCEPTS(Enum:D: Mu $topic) {
        my $method = $!key;
        $topic."$method"() === $!value;
    }

    method antipair(Enum:D:) { self.new(key => $!value, value => $!key) }

    multi method keys(Enum:D:)      { ($!key,).list }
    multi method kv(Enum:D:)        { $!key, $!value }
    multi method values(Enum:D:)    { ($!value,).list }
    multi method pairs(Enum:D:)     { (self,).list }
    multi method antipairs(Enum:D:) { self.new(key => $!value, value => $!key) }
    multi method invert(Enum:D:)    { $!value »=>» $!key }

    multi method Str(Enum:D:) { $!key ~ "\t" ~ $!value }

    multi method gist(Enum:D:) {
        my $result;
        if not %*gistseen<TOP> { my %*gistseen = :TOP ; return self.gist }
        if %*gistseen{self.WHICH} { %*gistseen{self.WHICH} = 2; return "Pair_{self.WHERE}" }
        %*gistseen{self.WHICH} = 1;
        if nqp::istype($!key, Enum) {
            $result = '(' ~ $!key.gist ~ ') => ' ~ $!value.gist;
        } else {
            $result = $!key.gist ~ ' => ' ~ $!value.gist;
        }
        $result = "(\\Pair_{self.WHERE} = $result)" if %*gistseen{self.WHICH}:delete == 2;
        $result;
    }

    multi method perl(Enum:D: :$arglist) {
        my $result;
        if not %*perlseen<TOP> { my %*perlseen = :TOP ; return self.perl }
        if %*perlseen{self.WHICH} { %*perlseen{self.WHICH} = 2; return "Pair_{self.WHERE}" }
        %*perlseen{self.WHICH} = 1;
        if nqp::istype($!key, Enum) {<commit_msg>Restore Enum.perl(:arglist) behavior<commit_after>my class Enum does Associative {
    has $.key;
    has $.value;

    method new(:$key, Mu :$value) { nqp::create(self).BUILD($key, $value) }
    method BUILD($!key, Mu $!value) { self }

    multi method ACCEPTS(Enum:D: Associative:D $topic) {
        $topic{$!key} ~~ $!value
    }

    multi method ACCEPTS(Enum:D: Mu $topic) {
        my $method = $!key;
        $topic."$method"() === $!value;
    }

    method antipair(Enum:D:) { self.new(key => $!value, value => $!key) }

    multi method keys(Enum:D:)      { ($!key,).list }
    multi method kv(Enum:D:)        { $!key, $!value }
    multi method values(Enum:D:)    { ($!value,).list }
    multi method pairs(Enum:D:)     { (self,).list }
    multi method antipairs(Enum:D:) { self.new(key => $!value, value => $!key) }
    multi method invert(Enum:D:)    { $!value »=>» $!key }

    multi method Str(Enum:D:) { $!key ~ "\t" ~ $!value }

    multi method gist(Enum:D:) {
        my $result;
        if not %*gistseen<TOP> { my %*gistseen = :TOP ; return self.gist }
        if %*gistseen{self.WHICH} { %*gistseen{self.WHICH} = 2; return "Pair_{self.WHERE}" }
        %*gistseen{self.WHICH} = 1;
        if nqp::istype($!key, Enum) {
            $result = '(' ~ $!key.gist ~ ') => ' ~ $!value.gist;
        } else {
            $result = $!key.gist ~ ' => ' ~ $!value.gist;
        }
        $result = "(\\Pair_{self.WHERE} = $result)" if %*gistseen{self.WHICH}:delete == 2;
        $result;
    }

    multi method perl(Enum:D: :$arglist) {
        my $result;
        if not %*perlseen<TOP> { my %*perlseen = :TOP ; return self.perl(:$arglist) }
        if %*perlseen{self.WHICH} { %*perlseen{self.WHICH} = 2; return "Pair_{self.WHERE}" }
        %*perlseen{self.WHICH} = 1;
        if nqp::istype($!key, Enum) {
{'fraction_non_alphanumeric': 0.20210409745293467, 'fraction_numerical': 0.0027685492801771874, 'mean_word_length': 2.5283203125, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, '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': '3778569', 'n_tokens_mistral': 1418, 'n_tokens_neox': 1340, 'n_words': 288}