/[suikacvs]/messaging/bunshin/Bunshin.pm
Suika

Diff of /messaging/bunshin/Bunshin.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by wakaba, Thu Aug 29 12:10:59 2002 UTC revision 1.6 by wakaba, Tue Sep 10 23:37:43 2002 UTC
# Line 51  sub set_hook_function ($$\&) { Line 51  sub set_hook_function ($$\&) {
51    $self->{'hook_'.$name} = $function;    $self->{'hook_'.$name} = $function;
52  }  }
53    
54    sub set_element_decoders ($%) {
55      my $self = shift;
56      my %list = @_;
57      for (keys %list) {
58        if ($list{$_} eq 'enentity_html') {
59          $list{$_} = \&Message::Util::enentity_html;
60        } elsif ($list{$_} eq 'deentity_html') {
61          $list{$_} = \&Message::Util::deentity_html;
62        ## TODO: escape_uri, unescape_uri
63        }
64      }
65      $self->{element_decoder} = %list;
66    }
67    
68  sub set_format ($$\&) {  sub set_format ($$\&) {
69    my $self = shift;    my $self = shift;
70    my $name = shift;    my $name = shift;
# Line 137  sub make_msgs ($) { Line 151  sub make_msgs ($) {
151      for my $i (0..$#{$self->{elements_message}}) {      for my $i (0..$#{$self->{elements_message}}) {
152        $p{$self->{elements_message}->[$i]} = ${$i+1};        $p{$self->{elements_message}->[$i]} = ${$i+1};
153      }      }
154        for my $n (keys %{$self->{element_decoder}}) {
155          if ($p{$n} && ref $self->{element_decoder}->{$n}) {
156            $p{$n} = &{ $self->{element_decoder}->{$n} } ($p{$n});
157          }
158        }
159      my $msg = &$f ($self, %p);      my $msg = &$f ($self, %p);
160      push @msg, $msg;      push @msg, $msg;
161    }gesx;    }gesx;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24