Index | index by Group | index by Distribution | index by Vendor | index by creation date | index by Name | Mirrors | Help | Search |
Name: perl-Perl-Critic-Policy-Variables-ProhibitLoopOnHash | Distribution: openSUSE Tumbleweed |
Version: 0.008 | Vendor: openSUSE |
Release: 1.10 | Build date: Tue Apr 23 07:21:43 2019 |
Group: Development/Libraries/Perl | Build host: reproducible |
Size: 28881 | Source RPM: perl-Perl-Critic-Policy-Variables-ProhibitLoopOnHash-0.008-1.10.src.rpm |
Packager: http://bugs.opensuse.org | |
Url: https://metacpan.org/release/Perl-Critic-Policy-Variables-ProhibitLoopOnHash | |
Summary: Don't write loops on hashes, only on keys and values of hashes |
When "looping over hashes," we mean looping over hash keys or hash values. If you forgot to call 'keys' or 'values' you will accidentally loop over both. foreach my $foo (%hash) {...} # not ok action() for %hash; # not ok foreach my $foo ( keys %hash ) {...} # ok action() for values %hash; # ok An effort is made to detect expressions: action() for %hash ? keys %hash : (); # ok action() for %{ $hash{'stuff'} } ? keys %{ $hash{'stuff'} } : (); # ok (Granted, the second example there doesn't make much sense, but I have found a variation of it in real code.)
Artistic-1.0 OR GPL-1.0-or-later
* Tue Apr 23 2019 Stephan Kulow <coolo@suse.com> - updated to 0.008 see /usr/share/doc/packages/perl-Perl-Critic-Policy-Variables-ProhibitLoopOnHash/Changes 0.008 2019-04-22 16:44:54+03:00 Asia/Jerusalem * GH #3: Some typo fixed. (Jakub Wilk) * Wed Apr 03 2019 Stephan Kulow <coolo@suse.com> - initial package 0.007 * created by cpanspec 1.78.09
/usr/lib/perl5/vendor_perl/5.40.0/Perl /usr/lib/perl5/vendor_perl/5.40.0/Perl/Critic /usr/lib/perl5/vendor_perl/5.40.0/Perl/Critic/Policy /usr/lib/perl5/vendor_perl/5.40.0/Perl/Critic/Policy/Variables /usr/lib/perl5/vendor_perl/5.40.0/Perl/Critic/Policy/Variables/ProhibitLoopOnHash.pm /usr/share/doc/packages/perl-Perl-Critic-Policy-Variables-ProhibitLoopOnHash /usr/share/doc/packages/perl-Perl-Critic-Policy-Variables-ProhibitLoopOnHash/Changes /usr/share/doc/packages/perl-Perl-Critic-Policy-Variables-ProhibitLoopOnHash/README /usr/share/licenses/perl-Perl-Critic-Policy-Variables-ProhibitLoopOnHash /usr/share/licenses/perl-Perl-Critic-Policy-Variables-ProhibitLoopOnHash/LICENSE /usr/share/man/man3/Perl::Critic::Policy::Variables::ProhibitLoopOnHash.3pm.gz
Generated by rpm2html 1.8.1
Fabrice Bellet, Sun Feb 9 01:37:00 2025