X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy%2FTask%2FRetrieve.pm;h=1580e94fba15d195269b48a2550072c39f3a1ee6;hb=8d22b67928c9e2d65e90308dd7560dcd1d4d797a;hp=095fe0226bedb24fcd047e1cee0f1f6a12e48f4a;hpb=dd20ee8778b01e4727f2fabfb9e4d5a4dcfb935d;p=irspy-moved-to-github.git diff --git a/lib/ZOOM/IRSpy/Task/Retrieve.pm b/lib/ZOOM/IRSpy/Task/Retrieve.pm index 095fe02..1580e94 100644 --- a/lib/ZOOM/IRSpy/Task/Retrieve.pm +++ b/lib/ZOOM/IRSpy/Task/Retrieve.pm @@ -1,4 +1,3 @@ -# $Id: Retrieve.pm,v 1.3 2006-11-02 16:11:44 mike Exp $ package ZOOM::IRSpy::Task::Retrieve; @@ -31,6 +30,9 @@ sub new { my $this = $class->SUPER::new(@_); $this->{rs} = $rs; $this->{index0} = $index0; + # Save initial record-syntax for render()'s benefit + $this->{syntax} = $this->{options}->{preferredRecordSyntax}; + return $this; } @@ -40,6 +42,8 @@ sub run { $this->set_options(); my $conn = $this->conn(); + $conn->connect($conn->option("host")); + my $rs = $this->{rs}; my $index0 = $this->{index0}; $this->irspy()->log("irspy_task", $conn->option("host"), @@ -53,7 +57,7 @@ sub run { sub render { my $this = shift(); - my $syntax = $this->{options}->{preferredRecordSyntax}; + my $syntax = $this->{syntax}; $syntax = defined $syntax ? "'$syntax'" : "undef"; return ref($this) . "(" . $this->{index0} . ", $syntax)"; }