projects
/
dh-make-perl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Build all packages removed dependencies of libtest-exception-perl libtest-warn-perl...
[dh-make-perl]
/
dev
/
i386
/
libperl-critic-perl
/
libperl-critic-perl-1.088
/
t
/
Subroutines
/
ProhibitExplicitReturnUndef.run
1
## name simple failure
2
## failures 3
3
## cut
4
5
sub test_sub1 {
6
$foo = shift;
7
return undef;
8
}
9
10
sub test_sub2 {
11
shift || return undef;
12
}
13
14
sub test_sub3 {
15
return undef if $bar;
16
}
17
18
#-----------------------------------------------------------------------------
19
20
## name simple success
21
## failures 0
22
## cut
23
24
sub test_sub1 {
25
$foo = shift;
26
return;
27
}
28
29
sub test_sub2 {
30
shift || return;
31
}
32
33
sub test_sub3 {
34
return if $bar;
35
}
36
37
$foo{return}; # hash key, not keyword
38
sub foo {return}; # no sibling