Passing values to CodeRefs



Whats the syntax for calling a coderef with arguments here?

this works:     $widget->signal_connect(clicked => \&rankChanged);

this doesnt:    $widget->signal_connect(clicked => \&rankChanged($arg));

this works in Perl/Tk but not here:
        $widget->signal_connect(clicked => [\&rankChanged, $arg1, $arg2]);

likewise: $widget->signal_connect(clicked => sub{});

If this is in the POD, where? (so that I can find it myself next time)

You guys have been very patient, and I can't thank you enough.
-- 


-Nik




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]