> I have a function in a lib that we use that has two referenced
> hashes.
No, you have a method in a class that has two referenced hashes.
Computers are frustratingly pedantic, and mastering the art requires
the same level of attention do detail at the human leve.
>
>
> ....
> my $zone = $self->{'zone'};
> my $params = $self->{'report-params'};
> my %zone_list = ();
>
> $count = $zone->generate_zone_list(\%zone_list,\%params);
You should have gotten a warning here remarkably similar to:
Global symbol "%params" requires explicit package name at /tmp/test.pl line 9.
(unless you have some other variable named %params that you are not telling us
about)
> ----------------------------------
>
> sub generate_zone_list {
> my ($self,$results_hash,$params) = @_;
>
> my $sched_id = %{$params}->scheduleId();
> my $filekey = $filekey.$sched_id;
> my $temp_file = "/tmp/.bw3-temp-${filekey}.tmp";
>
> return $temp_file;
> }
>
> This is what I would expect this to work. If I don't pass params as a
> reference it works with the following line:
> my $sched_id = $params->scheduleId();
>
> Anyone have an idea what might be going on here?
>
One can glean since $params->scheduleId() provides the response that
you want, that $params is an object, and you don't need to pass it by
reference. (ALL objects in Perl are implemented as blessed references
to SOMETHING)
just call $count = $zone->generate_zone_list(\%zone_list, $params);
In other news "$count" is a terrible name for a variable that is going
to hold a filename.
--L
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/