… | |
… | |
247 | |
247 | |
248 | IF true, then the values specified in the C<configure> will take |
248 | IF true, then the values specified in the C<configure> will take |
249 | precedence over any values configured via the rc file. The default is for |
249 | precedence over any values configured via the rc file. The default is for |
250 | the rc file to override any options specified in the program. |
250 | the rc file to override any options specified in the program. |
251 | |
251 | |
252 | =item secure => $pass->($nodeid) |
252 | =item secure => $pass->(@msg) |
253 | |
253 | |
254 | In addition to specifying a boolean, you can specify a code reference that |
254 | In addition to specifying a boolean, you can specify a code reference that |
255 | is called for every remote execution attempt - the execution request is |
255 | is called for every code execution attempt - the execution request is |
256 | granted iff the callback returns a true value. |
256 | granted iff the callback returns a true value. |
|
|
257 | |
|
|
258 | Most of the time the callback should look only at |
|
|
259 | C<$AnyEvent::MP::Kernel::SRCNODE> to make a decision, and not at the |
|
|
260 | actual message (which can be about anything, and is mostly provided for |
|
|
261 | diagnostic purposes). |
257 | |
262 | |
258 | See F<semp setsecure> for more info. |
263 | See F<semp setsecure> for more info. |
259 | |
264 | |
260 | =back |
265 | =back |
261 | |
266 | |
… | |
… | |
400 | |
405 | |
401 | sub rcv($@); |
406 | sub rcv($@); |
402 | |
407 | |
403 | my $KILME = sub { |
408 | my $KILME = sub { |
404 | (my $tag = substr $_[0], 0, 30) =~ s/([\x20-\x7e])/./g; |
409 | (my $tag = substr $_[0], 0, 30) =~ s/([\x20-\x7e])/./g; |
405 | kil $SELF, unhandled_message => "missing (tag or fallback) callback for message '$tag'"; |
410 | kil $SELF, unhandled_message => "no callback found for message '$tag'"; |
406 | }; |
411 | }; |
407 | |
412 | |
408 | sub port(;&) { |
413 | sub port(;&) { |
409 | my $id = $UNIQ . ++$ID; |
414 | my $id = $UNIQ . ++$ID; |
410 | my $port = "$NODE#$id"; |
415 | my $port = "$NODE#$id"; |