ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MP/bin/aemp
(Generate patch)

Comparing AnyEvent-MP/bin/aemp (file contents):
Revision 1.57 by root, Wed Mar 21 21:02:04 2012 UTC vs.
Revision 1.58 by root, Fri Mar 23 00:38:14 2012 UTC

375pass. 375pass.
376 376
377The algorithm to find the function is the same as used for C<< 377The algorithm to find the function is the same as used for C<<
378L<AnyEvent::MP>::spawn >>. 378L<AnyEvent::MP>::spawn >>.
379 379
380Example: run the globa service (which runs anyway, but this doesn't hurt). 380Example: run the global service.
381 381
382 aemp setservices AnyEvent::MP::Global:: 382 aemp setservices AnyEvent::MP::Global::
383 383
384Example: call the mymod::myfun function with arguments 1, 2 and 3. 384Example: call the mymod::myfun function with arguments 1, 2 and 3.
385 385
395Adds a single service. 395Adds a single service.
396 396
397=item delservice <initfunc> 397=item delservice <initfunc>
398 398
399Deletes the given service, if it exists. 399Deletes the given service, if it exists.
400
401=item seteval <string>
402
403Sometimes, all you need is to evaluate a small perl snippet to bring a
404node up. This sets a perl string that is eval'ed after the node has been
405configured.
406
407=item deleval
408
409Delete any eval string set with seteval.
400 410
401=back 411=back
402 412
403=head2 CONFIGURATION/PROFILE MANAGEMENT 413=head2 CONFIGURATION/PROFILE MANAGEMENT
404 414
947 splice @{ $profile->{services} }, $_, 1; 957 splice @{ $profile->{services} }, $_, 1;
948 last; 958 last;
949 } 959 }
950 ++$cfg->{dirty}; 960 ++$cfg->{dirty};
951 }, 961 },
962 seteval => sub {
963 @ARGV >= 1
964 or die "eval string missing\n";
965
966 $profile->{eval} = shift @ARGV;
967 ++$cfg->{dirty};
968 },
969 deleval => sub {
970 delete $profile->{eval};
971 ++$cfg->{dirty};
972 },
952 973
953 profile => sub { 974 profile => sub {
954 @ARGV >= 1 975 @ARGV >= 1
955 or die "profile name is missing\n"; 976 or die "profile name is missing\n";
956 my $name = shift @ARGV; 977 my $name = shift @ARGV;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines