From f7fe13d8e55db3cf6d40960f3ff784fb8dd2c34b Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 21 Jun 2006 14:35:03 +0000 Subject: [PATCH] Expose Pod object and per-target records to Test modules. --- lib/ZOOM/IRSpy.pm | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/lib/ZOOM/IRSpy.pm b/lib/ZOOM/IRSpy.pm index 7ed3046..973c68a 100644 --- 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; @@ -41,7 +41,10 @@ sub new { 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'"); @@ -144,7 +147,10 @@ sub initialise { } } + $this->{target2record} = \%target2record; $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 -- 1.7.10.4