# Generated by Class::Inline version 0.0.1
# Date: Wed Oct  5 12:38:59 2022
use strict;
use warnings;


package Sys::Cmd::Template;our$_HAS;sub Sys::Cmd::Template_CI::import {shift;$_HAS={@_ > 1 ? @_ : %{$_[0]}};$_HAS=$_HAS->{'has'}if exists$_HAS->{'has'}}our%_ATTRS;my%_BUILD_CHECK;sub new {my$class=shift;my$self={@_ ? @_ > 1 ? @_ : %{$_[0]}: ()};%_ATTRS=map {($_=>1)}keys %$self;bless$self,ref$class || $class;$_BUILD_CHECK{$class}//= do {my@possible=($class);my@BUILD;my@CHECK;while (@possible){no strict 'refs';my$c=shift@possible;push@BUILD,$c .'::BUILD' if exists &{$c .'::BUILD'};push@CHECK,$c .'::__CHECK' if exists &{$c .'::__CHECK'};push@possible,@{$c .'::ISA'}}[reverse(@CHECK),reverse(@BUILD)]};map {$self->$_}@{$_BUILD_CHECK{$class}};Carp::carp("Sys::Cmd::Template attribute '$_' unexpected")for keys%_ATTRS;$self}sub __CHECK {no strict 'refs';my$_attrs=*{ref($_[0]).'::_ATTRS'};map {delete$_attrs->{$_}}keys %$_HAS;$_[0]{'cmd'}=eval {$_HAS->{'cmd'}->{'isa'}->($_[0]{'cmd'})}if exists $_[0]{'cmd'};Carp::croak('invalid (Sys::Cmd::Template::cmd) value: ' .$@)if $@;$_[0]{'env'}=eval {$_HAS->{'env'}->{'isa'}->($_[0]{'env'})}if exists $_[0]{'env'};Carp::croak('invalid (Sys::Cmd::Template::env) value: ' .$@)if $@}sub cmd {if (@_ > 1){$_[0]{'cmd'}=eval {$_HAS->{'cmd'}->{'isa'}->($_[1])};Carp::croak('invalid (Sys::Cmd::Template::cmd) value: ' .$@)if $@;return $_[0]}elsif (!exists $_[0]{'cmd'}){$_[0]->cmd($_HAS->{'cmd'}->{'default'}->($_[0]))}$_[0]{'cmd'}}sub dir {if (@_ > 1){$_[0]{'dir'}=$_[1];return $_[0]}$_[0]{'dir'}}sub has_dir {exists $_[0]{'dir'}}sub encoding {if (@_ > 1){$_[0]{'encoding'}=$_[1];return $_[0]}$_[0]{'encoding'}}sub has_encoding {exists $_[0]{'encoding'}}sub env {if (@_ > 1){$_[0]{'env'}=eval {$_HAS->{'env'}->{'isa'}->($_[1])};Carp::croak('invalid (Sys::Cmd::Template::env) value: ' .$@)if $@;return $_[0]}$_[0]{'env'}}sub has_env {exists $_[0]{'env'}}sub input {if (@_ > 1){$_[0]{'input'}=$_[1];return $_[0]}$_[0]{'input'}}sub has_input {exists $_[0]{'input'}}BEGIN {$INC{'Sys/Cmd/Template.pm'}=__FILE__}
1;
