| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Goo::Thing::pm::Adder; |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
############################################################################### |
|
6
|
|
|
|
|
|
|
# Nigel Hamilton |
|
7
|
|
|
|
|
|
|
# |
|
8
|
|
|
|
|
|
|
# Copyright Nigel Hamilton 2005 |
|
9
|
|
|
|
|
|
|
# All Rights Reserved |
|
10
|
|
|
|
|
|
|
# |
|
11
|
|
|
|
|
|
|
# Author: Nigel Hamilton |
|
12
|
|
|
|
|
|
|
# Filename: Goo::Thing::pm::Adder.pm |
|
13
|
|
|
|
|
|
|
# Description: Add stuff to a Perl program |
|
14
|
|
|
|
|
|
|
# |
|
15
|
|
|
|
|
|
|
# Date Change |
|
16
|
|
|
|
|
|
|
# ---------------------------------------------------------------------------- |
|
17
|
|
|
|
|
|
|
# 01/08/05 Factored out of ProgramEditor as part of the new Goo |
|
18
|
|
|
|
|
|
|
# 09/08/2005 This is the first change that has been automatically added. |
|
19
|
|
|
|
|
|
|
# 09/08/2005 Added the function that enables me to added changes like this. We |
|
20
|
|
|
|
|
|
|
# also need to test the line wrapping. Does it do a good job of |
|
21
|
|
|
|
|
|
|
# retaining the columns? |
|
22
|
|
|
|
|
|
|
# 09/08/2005 I really like the way it handles automated dates - cool! |
|
23
|
|
|
|
|
|
|
# |
|
24
|
|
|
|
|
|
|
############################################################################## |
|
25
|
|
|
|
|
|
|
|
|
26
|
1
|
|
|
1
|
|
11086
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
37
|
|
|
27
|
|
|
|
|
|
|
|
|
28
|
1
|
|
|
1
|
|
5
|
use Goo::Object; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
20
|
|
|
29
|
1
|
|
|
1
|
|
5
|
use Goo::Prompter; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
27
|
|
|
30
|
1
|
|
|
1
|
|
6
|
use Goo::Thing::pm::PerlCoder; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
24
|
|
|
31
|
1
|
|
|
1
|
|
4
|
use Goo::Thing::pm::MethodMaker; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
27
|
|
|
32
|
1
|
|
|
1
|
|
5
|
use Goo::Thing::pm::TypeChecker; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
27
|
|
|
33
|
|
|
|
|
|
|
|
|
34
|
1
|
|
|
1
|
|
5
|
use base qw(Goo::Object); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
231
|
|
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
############################################################################### |
|
38
|
|
|
|
|
|
|
# |
|
39
|
|
|
|
|
|
|
# run - keep adding a thing to the program |
|
40
|
|
|
|
|
|
|
# |
|
41
|
|
|
|
|
|
|
############################################################################### |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub run { |
|
44
|
|
|
|
|
|
|
|
|
45
|
0
|
|
|
0
|
1
|
|
my ($this, $thing, $option) = @_; |
|
46
|
|
|
|
|
|
|
|
|
47
|
0
|
0
|
|
|
|
|
if (Goo::Thing::pm::TypeChecker::is_perl6($thing)) { |
|
48
|
0
|
|
|
|
|
|
Goo::Thing::pm::Perl6Compiler->new()->run($thing, $option); |
|
49
|
|
|
|
|
|
|
} else { |
|
50
|
0
|
|
|
|
|
|
Goo::Thing::pm::Perl5Compiler->new()->run($thing . $option); |
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 NAME |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Goo::Thing::pm::Adder - Add stuff to a Perl program |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
use Goo::Thing::pm::Adder; |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 METHODS |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=over |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=item run |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Delegate adding stuff to either Goo::Thing:pm::Perl5Adder or Goo::Thing::pm::Perl6Adder. |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=back |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 AUTHOR |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Nigel Hamilton <nigel@trexy.com> |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
88
|
|
|
|
|
|
|
|