package Cpanel::Easy::Apache::MPMWorker;

# cpanel - Cpanel/Easy/Apache/MPMWorker.pm        Copyright(c) 2011 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

our $easyconfig = {
    'name'      => 'MPM Worker',
    'url'       => 'http://httpd.apache.org/docs/[% apache_uri_version %]/mod/worker.html',
    'note'      => 'PHP may not be run as an Apache DSO (mod_php) while this MPM is in use',
    'verify_on' => "Have you read the documentation, fully understand the implications of using this MPM, and are you in a position to handle problems it may cause? If you answer NO to any of those questions it is highly recommended not to choose an MPM.",
    'modself'   => sub {
        my ( $easy, $self_hr, $profile_hr ) = @_;
        if ( $profile_hr->{'Cpanel::Easy::ModRuid2'} ) {
            $self_hr->{'skip'} = 1;    # they are incompatible
        }
    },
    'step' => {
        '0' => {
            'name'    => 'to config options',
            'command' => sub {
                my ($self) = @_;
                $self->replace_in_configure( { '--with-mpm' => 'worker' } );
                return ( 1, 'Ok' );
            },
        },
    },
};

1;
