line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Goo::Lister; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
############################################################################### |
4
|
|
|
|
|
|
|
# Nigel Hamilton |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# Copyright Nigel Hamilton 2005 |
7
|
|
|
|
|
|
|
# All Rights Reserved |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# Author: Nigel Hamilton |
10
|
|
|
|
|
|
|
# Filename: Goo::Lister.pm |
11
|
|
|
|
|
|
|
# Description: Load a whole list of Things at once - is this wise? |
12
|
|
|
|
|
|
|
# |
13
|
|
|
|
|
|
|
# Date Change |
14
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------- |
15
|
|
|
|
|
|
|
# 28/06/2005 Auto generated file |
16
|
|
|
|
|
|
|
# 28/06/2005 Need a simple loader |
17
|
|
|
|
|
|
|
# |
18
|
|
|
|
|
|
|
############################################################################### |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
3876
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
43
|
|
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
1
|
|
7
|
use Goo::Loader; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
29
|
|
23
|
1
|
|
|
1
|
|
6
|
use Goo::ConfigFile; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
155
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
############################################################################### |
27
|
|
|
|
|
|
|
# |
28
|
|
|
|
|
|
|
# get - return a list of things |
29
|
|
|
|
|
|
|
# |
30
|
|
|
|
|
|
|
############################################################################### |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub get { |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
1
|
|
my ($suffix) = @_; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# look up the master goo file that describes this type of object |
37
|
0
|
|
|
|
|
|
my $config_file = Goo::ConfigFile->new($suffix . ".goo"); |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
my @list; |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
foreach my $location ($config_file->get_locations()) { |
42
|
0
|
|
|
|
|
|
foreach my $file (FileUtilities::get_file_list($location)) { |
43
|
|
|
|
|
|
|
# print caller()." goo lister loading $file from $directory \n"; |
44
|
0
|
|
|
|
|
|
push(@list, Goo::Loader::load($file)); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# return a list of Things |
49
|
0
|
|
|
|
|
|
return @list; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 NAME |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Goo::Lister - Load a whole list of Things in one go |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 SYNOPSIS |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
use Goo::Lister; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 DESCRIPTION |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 METHODS |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=over |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item get |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
return a list of Things |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=back |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 AUTHOR |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Nigel Hamilton <nigel@trexy.com> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 SEE ALSO |
83
|
|
|
|
|
|
|
|