package Cpanel::Easy::PHP5::Tidy;

# cpanel - Cpanel/Easy/PHP5/Tidy.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'   => 'Tidy',
    'url'    => 'http://www.php.net/manual/en/ref.tidy.php',
    'dryrun' => {
        '0' => {
            'name'    => 'Find tidy path for PHP 5',
            'command' => sub {
                my ($self) = @_;
                my ( $path, @text ) = $self->get_path_installed('Cpanel::Easy::OptLib::tidy');

                if ($path) {
                    $self->{'__'}{'TidyPath'} = $path;
                    return ( 1, 'Ok' );
                }
                else {
                    return $path, @text;
                }
            },
        },
    },
    'step' => {
        '0' => {
            'name'    => 'to config options',
            'command' => sub {
                my ($self) = @_;
                $self->add_to_configure( { '--with-tidy' => $self->{'__'}{'TidyPath'} } );
                return ( 1, 'Ok' );
            },
        },
    },
};

1;
