sub do_callback_in_child {
my ($callback, $message) = @_;
+ # this whole thing is a workaround for perl 5.12's Storable.
+ # Can't pass a regexp through Storable.
+ if(ref($callback->{TRIGGER_COND}->{DST}) || ref($callback->{TRIGGER_COND}->{SRC})) {
+ foreach my $k (qw(DST SRC)) {
+ next unless defined $callback->{TRIGGER_COND}->{$k};
+ my $v = $callback->{TRIGGER_COND}->{$k};
+ $v = "$v"; # convert regexp to string
+ $callback->{TRIGGER_COND}->{$k} = $v;
+ }
+ #use Data::Dumper;
+ #ircd::debug( split($/, Data::Dumper::Dumper($worker->{UNIT})) );
+ }
if(my $worker = pop @free_workers) {
print "Asking worker ".$worker->{NUMBER}." to call ".$callback->{CALL}."\n" if DEBUG;
#store_fd([$unit], $worker->{SOCKET});
+++ /dev/null
-Index: SrSv/Process/Worker.pm
-===================================================================
---- SrSv/Process/Worker.pm (revision 3510)
-+++ SrSv/Process/Worker.pm (working copy)
-@@ -33,7 +33,7 @@ use Event;
- use English qw( -no_match_vars );
- use IO::Socket;
- use IO::File;
--use Storable qw(fd_retrieve store_fd);
-+use Storable qw(fd_retrieve store_fd dclone);
-
- use SrSv::Debug;
-
-@@ -181,6 +181,14 @@ sub kill_all_workers() {
- sub do_callback_in_child {
- my ($callback, $message) = @_;
-
-+ # this whole thing is a workaround for perl 5.12's Storable.
-+ # Can't pass a regexp through Storable.
-+ if(ref($callback->{TRIGGER_COND}->{DST}) || ref($callback->{TRIGGER_COND}->{SRC})) {
-+ $callback->{TRIGGER_COND} = dclone($callback->{TRIGGER_COND});
-+ delete $callback->{TRIGGER_COND}->{DST};
-+ #use Data::Dumper;
-+ #ircd::debug( split($/, Data::Dumper::Dumper($worker->{UNIT})) );
-+ }
- if(my $worker = pop @free_workers) {
- print "Asking worker ".$worker->{NUMBER}." to call ".$callback->{CALL}."\n" if DEBUG;
- #store_fd([$unit], $worker->{SOCKET});