I'm trying to get the verify command to access a different table than Links. It is within verify-child.pl that I need to make this change, but I'm not sure how to pass a paramater to it from parallel.pm.
This is what I have done.
in nph-verify.cgi I'm trying to pass $table
my $checker = new Links::Parallel (
'max_workunit' => $max_workunit,
'min_workunit' => $min_workunit,
'spawn_delay' => $spawn_delay,
'max_children' => $max_children,
'child_path' => $LINKS{child_path},
'path_to_perl' => $LINKS{path_to_perl},
'on_response' => \&link_report,
'table' => $table,
'debug_level' => 1
);
in Parallel.pm I accept the input by doing this:
....
$self->{to_check} = defined ( $p{to_check} ) ? $p{to_check} : [];
$self->{on_response} = defined ( $p{on_response} ) ? $p{on_response} : \&do_nothing;
$self->{table} = defined ( $p{table} ) ? $p{table} : "Links";
Now, what do I do in verify-child.pl to make these following lines evaluate the the $table I'm trying to pass to it.
$SQLquery = "select ID,URL from $table where ID in (" . join (",", @ARGV ) . ")";
$db = new Links: BSQL "$LINKS{admin_root_path}/defs/$table.def";
I've gotten every other part of the verify process to work on a different table except this part. This is the one place in all these scripts, I can't figure out how to pass a parameter.
Any clues..
Kyle
[This message has been edited by klangan (edited January 18, 2000).]
This is what I have done.
in nph-verify.cgi I'm trying to pass $table
my $checker = new Links::Parallel (
'max_workunit' => $max_workunit,
'min_workunit' => $min_workunit,
'spawn_delay' => $spawn_delay,
'max_children' => $max_children,
'child_path' => $LINKS{child_path},
'path_to_perl' => $LINKS{path_to_perl},
'on_response' => \&link_report,
'table' => $table,
'debug_level' => 1
);
in Parallel.pm I accept the input by doing this:
....
$self->{to_check} = defined ( $p{to_check} ) ? $p{to_check} : [];
$self->{on_response} = defined ( $p{on_response} ) ? $p{on_response} : \&do_nothing;
$self->{table} = defined ( $p{table} ) ? $p{table} : "Links";
Now, what do I do in verify-child.pl to make these following lines evaluate the the $table I'm trying to pass to it.
$SQLquery = "select ID,URL from $table where ID in (" . join (",", @ARGV ) . ")";
$db = new Links: BSQL "$LINKS{admin_root_path}/defs/$table.def";
I've gotten every other part of the verify process to work on a different table except this part. This is the one place in all these scripts, I can't figure out how to pass a parameter.
Any clues..
Kyle
[This message has been edited by klangan (edited January 18, 2000).]