|
NAMEData::Object::VarsABSTRACTEnv Vars Class for Perl 5SYNOPSISpackage main; use Data::Object::Vars; local %ENV = (USER => 'ubuntu', HOME => '/home/ubuntu'); my $vars = Data::Object::Vars->new( 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.INTEGRATESThis package integrates behaviors from:Data::Object::Role::Buildable Data::Object::Role::Proxyable Data::Object::Role::Stashable LIBRARIESThis package uses type constraints from:Types::Standard ATTRIBUTESThis package has the following attributes:namednamed(HashRef) This attribute is read-only, accepts "(HashRef)" values, and is optional. METHODSThis package implements the following methods:existsexists(Str $key) : Any The exists method takes a name or index and returns truthy if an associated value exists.
getget(Str $key) : Any The get method takes a name or index and returns the associated value.
namename(Str $key) : Any The name method takes a name or index and returns index if the the associated value exists.
setset(Str $key, Maybe[Any] $value) : Any The set method takes a name or index and sets the value provided if the associated argument exists.
stashedstashed() : HashRef The stashed method returns the stashed data associated with the object.
AUTHORAl Newkirk, "awncorp@cpan.org"LICENSECopyright (C) 2011-2019, Al Newkirk, et al.This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file" <https://github.com/iamalnewkirk/data-object-vars/blob/master/LICENSE>. PROJECTWiki <https://github.com/iamalnewkirk/data-object-vars/wiki>Project <https://github.com/iamalnewkirk/data-object-vars> Initiatives <https://github.com/iamalnewkirk/data-object-vars/projects> Milestones <https://github.com/iamalnewkirk/data-object-vars/milestones> Contributing <https://github.com/iamalnewkirk/data-object-vars/blob/master/CONTRIBUTE.md> Issues <https://github.com/iamalnewkirk/data-object-vars/issues>
Visit the GSP FreeBSD Man Page Interface. |