|
NAMEVenus::Args - Args Class ABSTRACTArgs Class for Perl 5 SYNOPSIS package main;
use Venus::Args;
my $args = Venus::Args->new(
named => { flag => 0, command => 1 }, # optional
value => ['--help', 'execute'],
);
# $args->flag; # $ARGV[0]
# $args->get(0); # $ARGV[0]
# $args->get(1); # $ARGV[1]
# $args->action; # $ARGV[1]
# $args->exists(0); # exists $ARGV[0]
# $args->exists('flag'); # exists $ARGV[0]
# $args->get('flag'); # $ARGV[0]
DESCRIPTIONThis package provides methods for accessing @ARGS items. ATTRIBUTESThis package has the following attributes: namednamed(HashRef) This attribute is read-write, accepts "(HashRef)" values, is optional, and defaults to "{}". INHERITSThis package inherits behaviors from: Venus::Kind::Utility INTEGRATESThis package integrates behaviors from: Venus::Role::Accessible Venus::Role::Buildable Venus::Role::Proxyable Venus::Role::Valuable METHODSThis package provides the following methods: defaultdefault() (arrayref) The default method returns the default value, i.e. @ARGV. Since 0.01
existsexists(string $key) (boolean) The exists method returns truthy or falsy if an index or alias value exists. Since 0.01
getget(string $key) (any) The get method returns the value of the index or alias. Since 0.01
indexedindexed() (hashref) The indexed method returns a set of indices and values. Since 0.01
namename(string $key) (string | undef) The name method resolves and returns the index for an index or alias, and returns undefined if not found. Since 0.01
setset(string $key, any $data) (any) The set method sets and returns the value of an index or alias. Since 0.01
unnamedunnamed() (arrayref) The unnamed method returns a list of unaliases indices. Since 0.01
AUTHORSAwncorp, "awncorp@cpan.org" LICENSECopyright (C) 2022, Awncorp, "awncorp@cpan.org". This program is free software, you can redistribute it and/or modify it under the terms of the Apache license version 2.0.
|