- "args"
-
my @values = $obj->args;
my $array_ref = $obj->args;
$obj->args(@values);
$obj->args($array_ref);
Get or set the array values. If called without an arguments,
it returns the array in list context, or a reference to the array in
scalar context. If called with arguments, it expands array references
found therein and sets the values.
- "args_clear"
-
$obj->args_clear;
Deletes all elements from the array.
- "args_count"
-
my $count = $obj->args_count;
Returns the number of elements in the array.
- "args_index"
-
my $element = $obj->args_index(3);
my @elements = $obj->args_index(@indices);
my $array_ref = $obj->args_index(@indices);
Takes a list of indices and returns the elements indicated by
those indices. If only one index is given, the corresponding array
element is returned. If several indices are given, the result is
returned as an array in list context or as an array reference in scalar
context.
- "args_pop"
-
my $value = $obj->args_pop;
Pops the last element off the array, returning it.
- "args_push"
-
$obj->args_push(@values);
Pushes elements onto the end of the array.
- "args_set"
-
$obj->args_set(1 => $x, 5 => $y);
Takes a list of index/value pairs and for each pair it sets
the array element at the indicated index to the indicated value. Returns
the number of elements that have been set.
- "args_shift"
-
my $value = $obj->args_shift;
Shifts the first element off the array, returning it.
- "args_splice"
-
$obj->args_splice(2, 1, $x, $y);
$obj->args_splice(-1);
$obj->args_splice(0, -1);
Takes three arguments: An offset, a length and a list.
Removes the elements designated by the offset and the length
from the array, and replaces them with the elements of the list, if any.
In list context, returns the elements removed from the array. In scalar
context, returns the last element removed, or
"undef" if no elements are removed.
The array grows or shrinks as necessary. If the offset is negative then
it starts that far from the end of the array. If the length is omitted,
removes everything from the offset onward. If the length is negative,
removes the elements from the offset onward except for -length elements
at the end of the array. If both the offset and the length are omitted,
removes everything. If the offset is past the end of the array, it
issues a warning, and splices at the end of the array.
- "args_unshift"
-
$obj->args_unshift(@values);
Unshifts elements onto the beginning of the array.
- "clear_args"
-
$obj->clear_args;
Deletes all elements from the array.
- "clear_opt"
-
$obj->clear_opt;
Deletes all keys and values from the hash.
- "count_args"
-
my $count = $obj->count_args;
Returns the number of elements in the array.
- "delete_opt"
-
$obj->delete_opt(@keys);
Takes a list of keys and deletes those keys from the hash.
- "exists_opt"
-
if ($obj->exists_opt($key)) { ... }
Takes a key and returns a true value if the key exists in the
hash, and a false value otherwise.
- "index_args"
-
my $element = $obj->index_args(3);
my @elements = $obj->index_args(@indices);
my $array_ref = $obj->index_args(@indices);
Takes a list of indices and returns the elements indicated by
those indices. If only one index is given, the corresponding array
element is returned. If several indices are given, the result is
returned as an array in list context or as an array reference in scalar
context.
- "keys_opt"
-
my @keys = $obj->keys_opt;
Returns a list of all hash keys in no particular order.
- "opt"
-
my %hash = $obj->opt;
my $hash_ref = $obj->opt;
my $value = $obj->opt($key);
my @values = $obj->opt([ qw(foo bar) ]);
$obj->opt(%other_hash);
$obj->opt(foo => 23, bar => 42);
Get or set the hash values. If called without arguments, it
returns the hash in list context, or a reference to the hash in scalar
context. If called with a list of key/value pairs, it sets each key to
its corresponding value, then returns the hash as described before.
If called with exactly one key, it returns the corresponding
value.
If called with exactly one array reference, it returns an
array whose elements are the values corresponding to the keys in the
argument array, in the same order. The resulting list is returned as an
array in list context, or a reference to the array in scalar
context.
If called with exactly one hash reference, it updates the hash
with the given key/value pairs, then returns the hash in list context,
or a reference to the hash in scalar context.
- "opt_clear"
-
$obj->opt_clear;
Deletes all keys and values from the hash.
- "opt_delete"
-
$obj->opt_delete(@keys);
Takes a list of keys and deletes those keys from the hash.
- "opt_exists"
-
if ($obj->opt_exists($key)) { ... }
Takes a key and returns a true value if the key exists in the
hash, and a false value otherwise.
- "opt_keys"
-
my @keys = $obj->opt_keys;
Returns a list of all hash keys in no particular order.
- "opt_values"
-
my @values = $obj->opt_values;
Returns a list of all hash values in no particular order.
- "pop_args"
-
my $value = $obj->pop_args;
Pops the last element off the array, returning it.
- "push_args"
-
$obj->push_args(@values);
Pushes elements onto the end of the array.
- "set_args"
-
$obj->set_args(1 => $x, 5 => $y);
Takes a list of index/value pairs and for each pair it sets
the array element at the indicated index to the indicated value. Returns
the number of elements that have been set.
- "shift_args"
-
my $value = $obj->shift_args;
Shifts the first element off the array, returning it.
- "splice_args"
-
$obj->splice_args(2, 1, $x, $y);
$obj->splice_args(-1);
$obj->splice_args(0, -1);
Takes three arguments: An offset, a length and a list.
Removes the elements designated by the offset and the length
from the array, and replaces them with the elements of the list, if any.
In list context, returns the elements removed from the array. In scalar
context, returns the last element removed, or
"undef" if no elements are removed.
The array grows or shrinks as necessary. If the offset is negative then
it starts that far from the end of the array. If the length is omitted,
removes everything from the offset onward. If the length is negative,
removes the elements from the offset onward except for -length elements
at the end of the array. If both the offset and the length are omitted,
removes everything. If the offset is past the end of the array, it
issues a warning, and splices at the end of the array.
- "unshift_args"
-
$obj->unshift_args(@values);
Unshifts elements onto the beginning of the array.
- "values_opt"
-
my @values = $obj->values_opt;
Returns a list of all hash values in no particular order.
Dist::Joseki::Cmd::Command inherits from App::Cmd::Command and
Dist::Joseki::Base.
The superclass Class::Accessor::Installer defines these methods
and functions: