my ($class, @args) = @_;
my @steps;
+ my %opts;
while (@args) {
my $arg = shift @args;
elsif ( $arg eq '--deactivate-all' ) {
push @steps, ['deactivate_all'];
}
+ elsif ( $arg =~ /^--shelltype(?:=(.*))?$/ ) {
+ my $shell = defined $1 ? $1 : shift @args;
+ $opts{shelltype} = $shell;
+ }
elsif ( $arg =~ /^--/ ) {
die "Unknown import argument: $arg";
}
push @steps, ['activate', undef];
}
- my $self = $class->new;
+ my $self = $class->new(%opts);
for (@steps) {
my ($method, @args) = @$_;