if ( not $code ) {
$code = $unit;
};
if ( $args and ref $args ) {
@args = @$args;
$code .= q{(@args)};
}
else {
@args = ();
};
if ( $argv and ref $argv ) {
@ARGV = @$argv;
}
####
if ( $A ) {
if ( $B ) {
{...}
}
else {
{...}
};
}
else {
if ( $B ) {
{...}
}
else {
{...}
};
};
####
# Four-outcome tree
my $cf = !!$code;
my $af = !!( $args and ref $args );
if ( $cf && $af ) {
@ARGV = @$args;
}
elsif ( $cf && !$af ) {
@args = ();
}
elsif ( !$cf && $af ) {
@args = @$args;
$code = $unit . q{(@args)};
}
elsif ( !$cf && !$af ) {
@args = ();
$code = $unit . q{()};
}
else { die 'Fifth element!' };