SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-Hash-AutoHash-Args rpm build for : OpenSuSE. For other distributions click perl-Hash-AutoHash-Args.

Name : perl-Hash-AutoHash-Args
Version : 1.180.0 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : lp156.1.1 Date : 2024-07-23 22:16:11
Group : Unspecified Source RPM : perl-Hash-AutoHash-Args-1.180.0-lp156.1.1.src.rpm
Size : 0.05 MB
Packager : https://www_suse_com/
Summary : Object-oriented processing of keyword-based argument lists
Description :
This class simplifies the handling of keyword argument lists. It replaces
Class::AutoClass::Args. See DIFFERENCES FROM Class::AutoClass::Args for a
discussion of what\'s new. See Hash::AutoHash::Args::V0 for a subclass which
is more compatible with the original.

The \'new\' method accepts a list, ARRAY, or HASH of keyword=>value pairs,
another Hash::AutoHash::Args object, or any object that can be coerced into
a HASH . It normalizes the keywords to ignore case and leading dashes
(\'-\'). The following keywords are all equivalent:

name, -name, -NAME, --NAME, Name, -Name

Arguments can be accessed using HASH or method notation; the following are
equivalent (assuming the keyword \'name\' exists in $args).

my $name=$args->{name};
my $name=$args->name;

Arguments values can also be changed using either notation:

$args->{name}=\'Jonathan\';
$args->name(\'Jonathan\');

Keywords are normalized automatically; the following are all equivalent.

my $name=$args->{name}; # lower case HASH key
my $name=$args->{Name}; # capitalized HASH key
my $name=$args->{NAME}; # upper case HASH key
my $name=$args->{NaMe}; # mixed case HASH key
my $name=$args->{-name}; # leading - in HASH key

The following are also all equivalent, and are equivalent to the ones above
assuming the keyword \'name\' exists in $args.

my $name=$args->name; # lower case method
my $name=$args->Name; # capitalized method
my $name=$args->NAME; # upper case method
my $name=$args->NaMe; # mixed case method

One caution is that when using method notation, keywords must be
syntactically legal method names and cannot include leading dashes. The
following is NOT legal.

my $name=$args->-name; # leading dash in method - ILLEGAL

Repeated keyword arguments are converted into an ARRAY of the values.

new Hash::AutoHash::Args(hobbies=>\'hiking\', hobbies=>\'cooking\')

is equivalent to

new Hash::AutoHash::Args(hobbies=>[\'hiking\', \'cooking\'])

Caution: when setting values using HASH or method notation, the grouping of
repeated arguments does NOT occur. Thus,

AATT$args{qw(hobbies hobbies)}=qw(running rowing);

leaves \'hobbies\' set to the last value presented, namely \'rowing\', as does

$args->hobbies(\'running\');
$args->hobbies(\'rowing\');

New keywords can be added using either notation. For example,

$args->{first_name}=\'Joe\';
$args->last_name(\'Plumber\');

If a keyword does not exist, the method notation returns nothing, while the
HASH notation returns undef. This difference matters in array context
(including when passing the result as a parameter).

my AATTlist=$args->non_existent; # AATTlist will contain 0 elements
my AATTlist=$args->{non_existent}; # AATTlist will contain 1 element

We find the method behavior (returning nothing) to be more natural and is
the behavior in Class::AutoClass::Args. Unfortunately, Perl does not
support this behavior with HASH notation; if the tied hash code returns
nothing, Perl converts this into undef before passing the result to the
caller. Too bad.

You can alias the object to a regular hash for more concise hash notation.

use Hash::AutoHash::Args qw(autoargs_alias);
autoargs_alias($args,%args);
my($name,$hobbies)=AATTargs{qw(name hobbies)};
$args{name}=\'Joseph\';

By aliasing $args to %args, you avoid the need to dereference the variable
when using hash notation. Admittedly, this is a minor convenience, but then
again, this entire class is about convenience.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl/15.6/noarch

Content of RPM  Changelog  Provides Requires

Download
ftp.icm.edu.pl  perl-Hash-AutoHash-Args-1.180.0-lp156.1.1.noarch.rpm
     

Provides :
perl(Hash::AutoHash::Args)
perl(Hash::AutoHash::Args::V0)
perl(Hash::AutoHash::Args::V0::helper)
perl(Hash::AutoHash::Args::helper)
perl(Hash::AutoHash::Args::tie)
perl-Hash-AutoHash-Args

Requires :
perl(:MODULE_COMPAT_5.26.1)
perl(Carp) >= 1.2
perl(Cwd) >= 3.4
perl(Exporter) >= 5.68
perl(Hash::AutoHash) >= 1.170
perl(List::MoreUtils) >= 0.33
perl(List::Util) >= 1.32
perl(Tie::Hash) >= 1.04
perl(Tie::ToObject) >= 0.03
perl(XSLoader) >= 0.16
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/usr/lib/perl5/vendor_perl/5.26.1/Hash
/usr/lib/perl5/vendor_perl/5.26.1/Hash/AutoHash
/usr/lib/perl5/vendor_perl/5.26.1/Hash/AutoHash/Args
/usr/lib/perl5/vendor_perl/5.26.1/Hash/AutoHash/Args.pm
/usr/lib/perl5/vendor_perl/5.26.1/Hash/AutoHash/Args/V0.pm
/usr/share/doc/packages/perl-Hash-AutoHash-Args
/usr/share/doc/packages/perl-Hash-AutoHash-Args/Changes
/usr/share/doc/packages/perl-Hash-AutoHash-Args/README
/usr/share/man/man3/Hash::AutoHash::Args.3pm.gz
/usr/share/man/man3/Hash::AutoHash::Args::V0.3pm.gz

 
ICM