<commit_before>package TestHooks::authen;

use strict;
use warnings FATAL => 'all';

use Apache::Access ();

sub handler {
    my $r = shift;

    my($rc, $sent_pw) = $r->get_basic_auth_pw;

    return $rc if $rc != 0;

    my $user = $r->user;

    unless ($user eq 'dougm' and $sent_pw eq 'foo') {
        $r->note_basic_auth_failure;
        return 401;
    }

    0;
}<commit_msg>use some constants in the tests<commit_after>package TestHooks::authen;

use strict;
use warnings FATAL => 'all';

use Apache::Access ();
use Apache::Const -compile => qw(OK AUTH_REQUIRED);

sub handler {
    my $r = shift;

    my($rc, $sent_pw) = $r->get_basic_auth_pw;

    return $rc if $rc != Apache::OK;

    my $user = $r->user;

    unless ($user eq 'dougm' and $sent_pw eq 'foo') {
        $r->note_basic_auth_failure;
        return Apache::AUTH_REQUIRED;
    }

    Apache::OK;
}
{'fraction_non_alphanumeric': 0.15102974828375287, 'fraction_numerical': 0.005720823798627002, 'mean_word_length': 3.032258064516129, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '4483666', 'n_tokens_mistral': 336, 'n_tokens_neox': 319, 'n_words': 86}