blib/lib/Class/MakeMethods/Template/Class.pm

filter: Statementstmt 93.3% 14 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 66.6% 2 / 3 totaltotal 87.5% 21 / 24 CC 1 SCAR 1.5
CC
1
Cov
93%
hash
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« blib/lib/Class/MakeMethods/Emulator/AccessorFast.pm ↑ Summary blib/lib/Class/MakeMethods/Template/Global.pm »
1 package Class::MakeMethods::Template::Class;
2  
3 2 ▶use Class::MakeMethods::Template::Generic '-isasubclass';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 $VERSION = 1.008;
6 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 require 5.0;
8 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 =head1 NAME
11  
12 Class::MakeMethods::Template::Class - Associate information with a package
13  
14 =head1 SYNOPSIS
15  
16 package MyObject;
17 use Class::MakeMethods::Template::Class (
18 scalar => [ 'foo' ]
19 );
20
21 package main;
22
23 MyObject->foo('bar')
24 print MyObject->foo();
25  
26 =head1 DESCRIPTION
27  
28 These meta-methods provide access to class-specific values. They are similar to Static, except that each subclass has separate values.
29  
30 =cut
31  
32 2 ▶sub generic {
Subroutine generic: called CC=1 SCAR=0.0
Pod undocumented
33 {
34 2 '-import' => {
35 'Template::Generic:generic' => '*'
36 },
37 'modifier' => {
38 },
39 'code_expr' => {
40 '_VALUE_' => '_ATTR_{data}->{_SELF_CLASS_}',
41 },
42 }
43 }
44  
45 ########################################################################
46  
47 =head2 Class:scalar
48  
49 Creates methods to handle a scalar variable in the declaring package.
50  
51 See the documentation on C<Generic:scalar> for interfaces and behaviors.
52  
53 =cut
54  
55 ########################################################################
56  
57 =head2 Class:array
58  
59 Creates methods to handle a array variable in the declaring package.
60  
61 See the documentation on C<Generic:array> for interfaces and behaviors.
62  
63 =cut
64  
65 1 ▶sub array {
Subroutine array: called CC=1 SCAR=0.0
Pod documented
66 {
67 1 '-import' => {
68 'Template::Generic:array' => '*',
69 },
70 'modifier' => {
71 '-all' => q{ _REF_VALUE_ or @{_ATTR_{data}->{_SELF_CLASS_}} = (); * },
72 },
73 'code_expr' => {
74 '_VALUE_' => '\@{_ATTR_{data}->{_SELF_CLASS_}}',
75 },
76 }
77 }
78  
79 ########################################################################
80  
81 =head2 Class:hash
82  
83 Creates methods to handle a hash variable in the declaring package.
84  
85 See the documentation on C<Generic:hash> for interfaces and behaviors.
86  
87 =cut
88  
89 0 ▶sub hash {
Subroutine hash: not called CC=1 SCAR=6.9
Pod documented
90 {
91 0 '-import' => {
92 'Template::Generic:hash' => '*',
93 },
94 'modifier' => {
95 '-all' => q{ _REF_VALUE_ or %{_ATTR_{data}->{_SELF_CLASS_}} = (); * },
96 },
97 'code_expr' => {
98 '_VALUE_' => '\%{_ATTR_{data}->{_SELF_CLASS_}}',
99 },
100 }
101 }
102  
103 2 1;
« blib/lib/Class/MakeMethods/Emulator/AccessorFast.pm ↑ Summary blib/lib/Class/MakeMethods/Template/Global.pm »