line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Goo::Thing::pm::Runner; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
############################################################################### |
6
|
|
|
|
|
|
|
# Nigel Hamilton |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# Copyright Nigel Hamilton 2005 |
9
|
|
|
|
|
|
|
# All Rights Reserved |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# Author: Nigel Hamilton |
12
|
|
|
|
|
|
|
# Filename: Runner.pm |
13
|
|
|
|
|
|
|
# Description: Run a Perl program |
14
|
|
|
|
|
|
|
# |
15
|
|
|
|
|
|
|
# Date Change |
16
|
|
|
|
|
|
|
# ---------------------------------------------------------------------------- |
17
|
|
|
|
|
|
|
# 01/08/2005 Factored out of ProgramEditor as part of the new Goo |
18
|
|
|
|
|
|
|
# |
19
|
|
|
|
|
|
|
############################################################################## |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
|
3787
|
use Goo::Object; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
31
|
|
22
|
1
|
|
|
1
|
|
8
|
use Goo::Prompter; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
23
|
1
|
|
|
1
|
|
7
|
use Goo::Thing::pm::TypeChecker; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
24
|
1
|
|
|
1
|
|
745
|
use Goo::Thing::pm::Perl5Runner; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
25
|
|
25
|
1
|
|
|
1
|
|
534
|
use Goo::Thing::pm::Perl6Runner; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
24
|
|
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
1
|
|
7
|
use base qw(Goo::Object); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
166
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
############################################################################### |
31
|
|
|
|
|
|
|
# |
32
|
|
|
|
|
|
|
# run - keep adding a thing to the program |
33
|
|
|
|
|
|
|
# |
34
|
|
|
|
|
|
|
############################################################################### |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub run { |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
0
|
1
|
|
my ($this, $thing, $target) = @_; |
39
|
|
|
|
|
|
|
|
40
|
0
|
0
|
|
|
|
|
if (Goo::Thing::pm::TypeChecker::is_perl6($thing)) { |
41
|
0
|
|
|
|
|
|
Goo::Thing::pm::Perl6Runner->new()->run($thing, $target); |
42
|
|
|
|
|
|
|
} else { |
43
|
0
|
|
|
|
|
|
Goo::Thing::pm::Perl5Runner->new()->run($thing, $target); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 NAME |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Goo::Thing::pm::Runner - Run a Perl program |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 SYNOPSIS |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
use Goo::Thing::pm::Runner; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 DESCRIPTION |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 METHODS |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=over |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item run |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Delegate running a Perl program to either Goo::Thing::pm::Perl6Runner or |
74
|
|
|
|
|
|
|
Goo::Thing::pm::Perl5Runner. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=back |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 AUTHOR |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Nigel Hamilton <nigel@trexy.com> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 SEE ALSO |
83
|
|
|
|
|
|
|
|