File: ProtectPrivateSubs.run

package info (click to toggle)
libperl-critic-perl 1.088-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,792 kB
  • ctags: 1,556
  • sloc: perl: 17,417; lisp: 340; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 656 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## name basic failure
## failures 5
## cut
Other::Package::_foo();
Other::Package->_bar();
Other::Package::_foo;
Other::Package->_bar;
$self->Other::Package::_baz();

#-----------------------------------------------------------------------------

## name basic passes
## failures 0
## cut
package My::Self::_private;
use My::Self::_private;
require My::Self::_private;

#-----------------------------------------------------------------------------

## name Difficult-to-detect pass
# This one should be illegal, but it is too hard to distinguish from
# the next one, which is legal
## failures 0
## cut
$pkg->_foo();

$self->_bar();
$self->SUPER::_foo();