![]() |
![]()
| ![]() |
![]()
NAMEVenus::Vars - Vars Class ABSTRACTVars Class for Perl 5 SYNOPSISpackage main; use Venus::Vars; my $vars = Venus::Vars->new( value => { USER => 'awncorp', HOME => '/home/awncorp', }, named => { iam => 'USER', root => 'HOME', }, ); # $vars->root; # $ENV{HOME} # $vars->home; # $ENV{HOME} # $vars->get('home'); # $ENV{HOME} # $vars->get('HOME'); # $ENV{HOME} # $vars->iam; # $ENV{USER} # $vars->user; # $ENV{USER} # $vars->get('user'); # $ENV{USER} # $vars->get('USER'); # $ENV{USER} DESCRIPTIONThis package provides methods for accessing %ENV 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() (hashref) The default method returns the default value, i.e. "{%ENV}". Since 0.01
existsexists(string $key) (boolean) The exists method takes a name or index and returns truthy if an associated value exists. Since 0.01
getget(string $key) (any) The get method takes a name or index and returns the associated value. Since 0.01
namename(string $key) (string | undef) The name method takes a name or index and returns index if the the associated value exists. Since 0.01
setset(string $key, any $value) (any) The set method takes a name or index and sets the value provided if the associated argument exists. Since 0.01
unnamedunnamed() (hashref) The unnamed method returns an arrayref of values which have not been named using the "named" attribute. 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.
|