Shawn H Corey wrote:

>>> sub perform_find {
>>>
>>>     my $self    = shift;
>>>
>>>     my $find_this   = $self->query->param( 'find_this' );
>>>     my $search_data = $self->query->param( 'search_data' );
>>>
>>>     my %find_commands = (
>>>
>>> # I'm trying to call the method on myself
>>>                 plan_by_id  => \&{ $self->_find_plan_by_id },
>>>             );
>>>
>>> # ...obj passed in implicitly as expected
>>>     $find_commands{ $find_this }( $search_data );
> 
> &{ $find_commands{ $find_this } }( $search_data );

Thanks Shawn, but this did not work.

I even made numerous modifications to the table entry and the call, but
the result is the same ( $self is not passed in ).

It works the way I have it... I'm just curious to know how to use the
method call syntax on the right-side of a dispatch table entry
successfully :)

Cheers,

Steve

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to