Class/Fields/Attribs.pm

filter: Statementstmt 100% 23 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 29 / 29 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« public.pm ↑ Summary Class/Fields/Inherit.pm »
1 package Class::Fields::Attribs;
2  
3 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 7 ▶use vars qw( @EXPORT @ISA $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
6 7 @EXPORT = qw(PUBLIC PRIVATE INHERITED PROTECTED);
7 7 require Exporter;
8 7 @ISA = qw(Exporter);
9 7 $VERSION = '0.03';
10  
11 # Inheritance constants.
12 # Its too bad I can't use 0bXXX since its 5.6 only.
13 7 ▶use constant PUBLIC => 2**0; # Open to the public, will be inherited.
Subroutine BEGIN: called CC=1 SCAR=0.0
14 7 ▶use constant PRIVATE => 2**1; # Not to be used by anyone but that class,
Subroutine BEGIN: called CC=1 SCAR=0.0
15 # will not be inherited
16 7 ▶use constant INHERITED => 2**2; # This member was inherited
Subroutine BEGIN: called CC=1 SCAR=0.0
17 7 ▶use constant PROTECTED => 2**3; # Not to be used by anyone but that class
Subroutine BEGIN: called CC=1 SCAR=0.0
18 # and its subclasses, will be inherited.
19  
20 # For backwards compatibility.
21 # constant.pm doesn't like leading underscores. Damn.
22 sub _PUBLIC () { PUBLIC }
23 sub _PRIVATE () { PRIVATE }
24 sub _INHERITED () { INHERITED }
25 sub _PROTECTED () { PROTECTED }
26  
27 7 return 'FIRE!';
28  
29 __END__
« public.pm ↑ Summary Class/Fields/Inherit.pm »