Commit 82b427c0 authored by Leo Gordon's avatar Leo Gordon
Browse files

switch to using uniform toString() diagnostic method

parent 2416bd72
......@@ -208,21 +208,29 @@ sub condition_analysis {
}
=head2 print_rule
=head2 toString
Args : (none)
Example : print $c_rule->toString()."\n";
Description: returns a stringified representation of the rule
Returntype : string
Usage : $ctrlRule->print_rule;
Function: Prints a description of the rule for use in debugging.
=cut
sub print_rule {
my $self = shift;
print("AnalysisCtrlRule ",
" ctrled_analysis_id=", $self->ctrled_analysis_id,
" condition_analysis_url=", $self->condition_analysis_url,
"\n");
sub toString {
my $self = shift;
return join('',
'AnalysisCtrlRule',
# '(dbID=', ($self->dbID || '?'), ')', # this object doesn't have a dbID
': ',
$self->condition_analysis_url,
' -| ',
$self->ctrled_analysis->logic_name,
);
}
1;
......
......@@ -286,14 +286,33 @@ sub to_analysis {
return $self->{'_to_analysis'};
}
sub print_rule {
my $self = shift;
print("DataflowRule dbID=", $self->dbID,
" from_id=", $self->from_analysis_id,
" to_url=", $self->to_analysis_url,
" branch=", $self->branch_code,
"\n");
=head2 toString
Args : (none)
Example : print $df_rule->toString()."\n";
Description: returns a stringified representation of the rule
Returntype : string
=cut
sub toString {
my $self = shift;
return join('',
'DataflowRule(dbID=',
($self->dbID || '?'),
($self->funnel_dataflow_rule_id ? ' --|| '.$self->funnel_dataflow_rule_id : ''),
'): [#',
$self->branch_code,
'] ',
$self->from_analysis->logic_name,
' -> ',
$self->to_analysis_url,
($self->input_id_template ? (' WITH TEMPLATE: '.$self->input_id_template) : ''),
);
}
1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment