| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Goo::Thing::pm::Method; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
############################################################################### |
|
4
|
|
|
|
|
|
|
# Nigel Hamilton |
|
5
|
|
|
|
|
|
|
# |
|
6
|
|
|
|
|
|
|
# Copyright Nigel Hamilton 2005 |
|
7
|
|
|
|
|
|
|
# All Rights Reserved |
|
8
|
|
|
|
|
|
|
# |
|
9
|
|
|
|
|
|
|
# Author: Nigel Hamilton |
|
10
|
|
|
|
|
|
|
# Filename: Goo::Thing::pm::Method.pm |
|
11
|
|
|
|
|
|
|
# Description: Object for modelling methods |
|
12
|
|
|
|
|
|
|
# |
|
13
|
|
|
|
|
|
|
# Date Change |
|
14
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------- |
|
15
|
|
|
|
|
|
|
# 20/02/2005 Auto generated file |
|
16
|
|
|
|
|
|
|
# 20/02/2005 Needed one for the Goo's PerlCoder module |
|
17
|
|
|
|
|
|
|
# |
|
18
|
|
|
|
|
|
|
############################################################################### |
|
19
|
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
5
|
use strict; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
32
|
|
|
21
|
|
|
|
|
|
|
|
|
22
|
1
|
|
|
1
|
|
6
|
use Goo::Object; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
17
|
|
|
23
|
1
|
|
|
1
|
|
6
|
use Goo::Template; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
17
|
|
|
24
|
1
|
|
|
1
|
|
5
|
use Goo::WebDBLite; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
28
|
|
|
25
|
1
|
|
|
1
|
|
5
|
use base qw(Goo::Object); # Method isa Object |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
266
|
|
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $method_template = "perl-method.tpl"; |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
############################################################################### |
|
31
|
|
|
|
|
|
|
# |
|
32
|
|
|
|
|
|
|
# new - construct a method object |
|
33
|
|
|
|
|
|
|
# |
|
34
|
|
|
|
|
|
|
############################################################################### |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub new { |
|
37
|
|
|
|
|
|
|
|
|
38
|
0
|
|
|
0
|
1
|
|
my ($class, $params) = @_; |
|
39
|
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
my $this = $class->SUPER::new(); |
|
41
|
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
$this->{method} = $params->{method}; |
|
43
|
0
|
|
|
|
|
|
$this->{description} = $params->{description}; |
|
44
|
0
|
|
|
|
|
|
$this->{signature} = $params->{signature}; |
|
45
|
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
return $this; |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
############################################################################### |
|
52
|
|
|
|
|
|
|
# |
|
53
|
|
|
|
|
|
|
# get_method - return the name of the method |
|
54
|
|
|
|
|
|
|
# |
|
55
|
|
|
|
|
|
|
############################################################################### |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub get_method { |
|
58
|
|
|
|
|
|
|
|
|
59
|
0
|
|
|
0
|
1
|
|
my ($this) = @_; |
|
60
|
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
return $this->{method}; |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
} |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
############################################################################### |
|
67
|
|
|
|
|
|
|
# |
|
68
|
|
|
|
|
|
|
# to_string - return a template for a method |
|
69
|
|
|
|
|
|
|
# |
|
70
|
|
|
|
|
|
|
############################################################################### |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub to_string { |
|
73
|
|
|
|
|
|
|
|
|
74
|
0
|
|
|
0
|
1
|
|
my ($this) = @_; |
|
75
|
|
|
|
|
|
|
|
|
76
|
0
|
0
|
|
|
|
|
if ($this->{signature}) { |
|
77
|
0
|
|
|
|
|
|
$this->{signature} = "my ($this->{signature}) = \@\_;"; |
|
78
|
|
|
|
|
|
|
} |
|
79
|
|
|
|
|
|
|
|
|
80
|
0
|
|
|
|
|
|
return Goo::Template::replace_tokens_in_string(Goo::WebDBLite::get_template($method_template), |
|
81
|
|
|
|
|
|
|
$this); |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
} |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
1; |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
__END__ |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 NAME |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Goo::Thing::pm::Method - Object for modelling methods |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
use Goo::Thing::pm::Method; |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 METHODS |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=over |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=item new |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
construct a method object |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=item get_method |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
return the name of the method |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=item to_string |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
return a filled in template for a method |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=back |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head1 AUTHOR |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Nigel Hamilton <nigel@trexy.com> |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
126
|
|
|
|
|
|
|
|