Changeset 849 for LATMOS-Accounts/lib/LATMOS/Accounts/Cli.pm
- Timestamp:
- 03/29/10 19:09:13 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts/lib/LATMOS/Accounts/Cli.pm
r848 r849 17 17 my $env = LATMOS::Accounts::Cli->new({ prompt => sub { $_[0]->base->label . " cli > " }, }, 18 18 $labase); 19 $env->add_func('unexported', { 20 help => 'unexported yes|no|show - switch or show base mode regarding' . 21 ' unexported objects', 22 completion => sub { 23 if (!$_[2]) { 24 return qw(yes no show); 25 } 26 }, 27 code => sub { 28 my ($env, $arg) = @_; 29 if ($arg eq 'yes') { 30 $env->base->unexported(1); 31 print $OUT "Unexported are now show"; 32 } elsif ($arg eq 'no') { 33 $env->base->unexported(0); 34 print $OUT "Unexported are no longer show"; 35 } elsif ($arg eq 'show') { 36 print $OUT "Unexported objects " . $env->base->unexported ? 37 "enable" : "disable"; 38 } else { 39 print $OUT "wrong argument"; 40 } 41 }, 42 }); 19 43 $env->add_func('ls', { 20 44 help => 'ls object_type - list object of type object_type',
Note: See TracChangeset
for help on using the changeset viewer.