CLI-Driver
view release on metacpan or search on metacpan
t/lib/CLI/Driver/Test.pm view on Meta::CPAN
package CLI::Driver::Test;
use Modern::Perl;
use Moose;
use namespace::autoclean;
use Kavorka '-all';
use Data::Printer alias => 'pdump';
###############################
###### PUBLIC ATTRIBUTES ######
###############################
has env => (
is => 'rw',
isa => 'Str|Undef',
lazy => 1,
builder => '_build_env',
);
################################
###### PRIVATE_ATTRIBUTES ######
################################
############################
###### PUBLIC METHODS ######
############################
method test1_method {
return "hello world";
}
method test2_method (Str :$myarg!) {
return "test2: $myarg";
}
method test3_method (Str :$myarg!,
Str :$softargX) {
if ( !$softargX ) {
if ( $ENV{SOFTARGX} ) {
# ok
}
else {
confess;
}
}
return $softargX;
}
method test4_method (Str :$myarg!,
Str :$softargX,
Str :$optionalargZ) {
if ( !$softargX ) {
if ( $ENV{SOFTARGX} ) {
# ok
}
else {
confess;
}
}
( run in 0.540 second using v1.01-cache-2.11-cpan-39bf76dae61 )