<commit_before>package Cpanel::Easy::Speed;

our $easyconfig = {
  'name'      => 'mod_pagespeed',
  'url'       => 'http://www.prajith.in',
  'note'      => 'mod_pagespeed for Apache 2.x',
  'hastargz'  => 1,
  'ensurepkg' => [qw{rpm cpio}],
  'depends'   => { 'optmods' => { 'Cpanel::Easy::Apache::Deflate' => 1, 'Cpanel::Easy::Apache::Version' => 0, }, },
  'implies'   => { 'Cpanel::Easy::Apache::Deflate' => 1, 'Cpanel::Easy::Apache::Version' => 0, },
  'src_cd2'   => 'pagespeed/',

  'when_i_am_off' => sub {
    my ($self) = @_;
    my $unlink_file = "/usr/local/apache/conf/pagespeed.conf";
    unlink $unlink_file;

    if ( -e $unlink_file ) {
      $self->print_alert( q{unlink '[_1]' failed: [_2]}, $unlink_file, $! );
    }

    $self->strip_from_httpconf(
        'Include "/usr/local/apache/conf/pagespeed.conf"'
    );
  },

  'step' => {

    '0' => {
      'name'    => 'Installing mod_pagespeed',
      'command' => sub {
        my ($self) = @_;<commit_msg>Fixed ## Mod_version checking while using Apache 2.4<commit_after>package Cpanel::Easy::Speed;

our $easyconfig = {
  'name'      => 'mod_pagespeed',
  'url'       => 'http://www.prajith.in',
  'note'      => 'mod_pagespeed for Apache 2.x',
  'hastargz'  => 1,
  'ensurepkg' => [qw{rpm cpio}],
  'depends'   => { 'optmods' => { 'Cpanel::Easy::Apache::Deflate' => 1, 'Cpanel::Easy::Apache::Version' => 0, }, },
  'implies'   => { 'Cpanel::Easy::Apache::Deflate' => 1, 'Cpanel::Easy::Apache::Version' => 0, },
  'src_cd2'   => 'pagespeed/',

  'when_i_am_off' => sub {
    my ($self) = @_;
    my $unlink_file = "/usr/local/apache/conf/pagespeed.conf";
    unlink $unlink_file;

    if ( -e $unlink_file ) {
      $self->print_alert( q{unlink '[_1]' failed: [_2]}, $unlink_file, $! );
    }

    $self->strip_from_httpconf(
        'Include "/usr/local/apache/conf/pagespeed.conf"'
    );
  },

  'modself' => sub {
   # we do not need to use 'reverse' when selecting mod_version in
   # Apache 2.4 because cPanel use './configure --enable-modules=none'.
    my ( $easy, $self_hr, $profile_hr ) = @_;
    if ( $profile_hr->{'Apache'}{'version'} eq '2_4' ) {
       $self_hr->{'implies'} = { 'Cpanel::Easy::Apache::Deflate' => 1, 'Cpanel::Easy::Apache::Version' => 1, };
       $self_hr->{'depends'} = { 'optmods' => { 'Cpanel::Easy::Apache::Deflate' => 1, 'Cpanel::Easy::Apache::Version' => 1, }, },
    }
  },

  'step' => {

    '0' => {
      'name'    => 'Installing mod_pagespeed',
      'command' => sub {
        my ($self) = @_;
{'fraction_non_alphanumeric': 0.22531847133757962, 'fraction_numerical': 0.01194267515923567, 'mean_word_length': 3.1264367816091956, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 52, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4349675', 'n_tokens_mistral': 1034, 'n_tokens_neox': 993, 'n_words': 167}