On Tue, Jul 31, 2001 at 07:52:13PM +0300, raptor wrote:
> script.pl
> ===========
> use Helper;
> my $callbackFunc = \&Helper::func;
> my $obj = new BigOne ( vals => $callbackFunc);
> 
> BigOne.pm
> ==========
> my $vals = shift;
> ....
> if (ref $vals eq 'CODE') {
>    ...........
>     my $kv = &$vals( id => $selected, dbh => $$self{dbh} );
>    ..............
> };
> ....
> 
> See  $kv gets the return value from Helper::func(),  everything is OK until
> I need to pass one more parameter to this function which I don't know in
> BigOne.pm but know at script.pl....

my $callbackFunc = sub { &Helper::func(something=>$here, also=>$this, @_) }

maybe?

-- 
Khan said that revenge is a dish best served cold. I think 
sometimes it's best served hot, chunky, and foaming. 
        - P.J.Lee ('79-'80)
 
[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

Reply via email to