File: ConditionalDeclarations.run

package info (click to toggle)
libperl-critic-freenode-perl 0.028-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 416 kB
  • sloc: perl: 986; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 257 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
## name ConditionalDeclarations
## failures 3
## cut

my $foo = $bar if $baz;
my ($foo, $bar) = @baz unless $abc;
our $foo = $_ for @bar;

## name UnconditionalDeclarations
## failures 0
## cut

my $foo = $bar;
$foo = $bar if $baz;
our $bar = $baz ? 1 : 2;