# lib/App/Apache/Wrapper.pm { package App::Apache::Wrapper; use Moose; has 'apache_path' => ( is => 'ro', isa => 'Str', ); sub run { my $self = shift; system($self->apache_path); } } # apache.pl use App::Apache::Wrapper; App::Apache::Wrapper -> new(apache_path => '/usr/sbin/httpd') -> run;