Name : perl-warnings-unused
| |
Version : 0.06
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 6.16
| Date : 2017-08-04 17:27:24
|
Group : Development/Libraries/Perl
| Source RPM : perl-warnings-unused-0.06-6.16.src.rpm
|
Size : 0.02 MB
| |
Packager : (none)
| |
Summary : Produces warnings when unused variables are detected
|
Description :
*Note:* The author no longer maintain this module. Consider the Test::Vars manpage if you detect unused vars as a unit test.
This pragmatic module extends lexical warnings to complain about unused variables.
It produces warnings when a \'my\' variable or \'state\' variable is unused aside from its declaration.
Given you write a subroutine like this:
sub f{ my($x, $y, $z) = AATT_; $y++; # used return sub{ $z }; # used }
The code above will be complained about \'$x\', because it is used nowhere aside from its declaration.
You should write \'f()\' like this:
sub f{ my(undef, $y, $z) = AATT_; $y++; # used return sub{ $z }; # used }
Here, one will see the obvious intention to ignore the first argument of \'f()\'.
The check routine works only at the compile time, so it affect nothing about the run time.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-W/openSUSE_Tumbleweed/x86_64 |