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

use Config;
use Apache::Test;

# skip all tests in this directory unless mod_perl is enabled
plan tests => 1, \&my_need;

ok 1;

sub my_need {

    my $ok = 1;

    if ( $Config{'osname'} eq 'linux' ) {
        $ok = need_module('Linux::Pid');
        if ( -e '/proc/self/smaps' ) {
            $ok &= need_module('Linux::Smaps');
        }
    }
    elsif ( $Config{'osname'} =~ /(bsd|aix)/i ) {
        $ok &= need_module('BSD::Resource');
    }
    elsif ( $Config{'osname'} eq 'MSWin32' ) {
        $ok &= need_module('Win32::API');
    }

    $ok &= need_module('mod_perl.c');

    $ok &= need_apache(1);

    $ok &= need_min_module_version('Test::Builder' => '0.18_01');

    return $ok;
}<commit_msg>client side test for 2.x series<commit_after>use strict;
use warnings FATAL => 'all';

use Config;
use Apache::Test;

# skip all tests in this directory unless mod_perl is enabled for 2.x series
plan tests => 1, \&my_need;

ok 1;

sub my_need {

    my $ok = 1;

    if ( $Config{'osname'} eq 'linux' ) {
        $ok = need_module('Linux::Pid');
        if ( -e '/proc/self/smaps' ) {
            $ok &= need_module('Linux::Smaps');
        }
    }
    elsif ( $Config{'osname'} =~ /(bsd|aix)/i ) {
        $ok &= need_module('BSD::Resource');
    }
    elsif ( $Config{'osname'} eq 'MSWin32' ) {
        $ok &= need_module('Win32::API');
    }

    $ok &= need_min_apache_version("2.0.48");

    eval { require mod_perl2; };
		$ok &= $mod_perl2::VERSION >= 1.99022 ? 1 : 0; ## 2.0.0-RC5+

    $ok &= need_min_module_version('Test::Builder' => '0.18_01');

    return $ok;
}
{'fraction_non_alphanumeric': 0.18864468864468864, 'fraction_numerical': 0.027472527472527472, 'mean_word_length': 2.68314606741573, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '3659318', 'n_tokens_mistral': 657, 'n_tokens_neox': 603, 'n_words': 139}