projects
/
irspy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d4d8c24
)
Expose Pod object and per-target records to Test modules.
author
Mike Taylor
<mike@indexdata.com>
Wed, 21 Jun 2006 14:35:03 +0000
(14:35 +0000)
committer
Mike Taylor
<mike@indexdata.com>
Wed, 21 Jun 2006 14:35:03 +0000
(14:35 +0000)
lib/ZOOM/IRSpy.pm
patch
|
blob
|
history
diff --git
a/lib/ZOOM/IRSpy.pm
b/lib/ZOOM/IRSpy.pm
index
7ed3046
..
973c68a
100644
(file)
--- a/
lib/ZOOM/IRSpy.pm
+++ b/
lib/ZOOM/IRSpy.pm
@@
-1,4
+1,4
@@
-# $Id: IRSpy.pm,v 1.3 2006-06-20 16:32:03 mike Exp $
+# $Id: IRSpy.pm,v 1.4 2006-06-21 14:35:03 mike Exp $
package ZOOM::IRSpy;
package ZOOM::IRSpy;
@@
-41,7
+41,10
@@
sub new {
my $this = bless {
conn => $conn,
allrecords => 1, # unless overridden by targets()
my $this = bless {
conn => $conn,
allrecords => 1, # unless overridden by targets()
- # query and targets will be filled in later
+ query => undef, # filled in later
+ targets => undef, # filled in later
+ target2record => undef, # filled in later
+ pod => undef, # filled in later
}, $class;
$this->log("irspy", "starting up with database '$dbname'");
}, $class;
$this->log("irspy", "starting up with database '$dbname'");
@@
-144,7
+147,10
@@
sub initialise {
}
}
}
}
+ $this->{target2record} = \%target2record;
$this->{pod} = new ZOOM::Pod(@{ $this->{targets} });
$this->{pod} = new ZOOM::Pod(@{ $this->{targets} });
+ delete $this->{targets}; # The information is now in the Pod.
+ delete $this->{query}; # Not needed at all
}
}
@@
-191,6
+197,20
@@
sub _run_test {
}
}
+# Access methods for the use of Test modules
+sub pod {
+ my $this = shift();
+ return $this->{pod};
+}
+
+sub record {
+ my $this = shift();
+ my($target) = @_;
+ return $this->{target2record}->{$target};
+}
+
+
+
=head1 SEE ALSO
ZOOM::IRSpy::Record
=head1 SEE ALSO
ZOOM::IRSpy::Record