Revision 3a94c2e2
Von Moritz Bunkus vor mehr als 9 Jahren hinzugefügt
SL/ClientJS.pm | ||
---|---|---|
139 | 139 |
$method = (delete($self->{_prefix}) || '') . $method; |
140 | 140 |
my $num_args = $supported_methods{$method}; |
141 | 141 |
|
142 |
croak "Unsupported jQuery action: $method" unless defined $num_args;
|
|
142 |
croak "Unsupported jQuery action: $method" unless defined $num_args; |
|
143 | 143 |
|
144 | 144 |
if ($num_args > 0) { |
145 |
croak "Parameter count mismatch for $method(actual: " . scalar(@args) . " wanted: $num_args)" if scalar(@args) != $num_args; |
|
145 |
croak "Parameter count mismatch for $method(actual: " . scalar(@args) . " wanted: $num_args)" if scalar(@args) != $num_args;
|
|
146 | 146 |
} else { |
147 | 147 |
$num_args *= -1; |
148 | 148 |
croak "Parameter count mismatch for $method(actual: " . scalar(@args) . " wanted at least: $num_args)" if scalar(@args) < $num_args; |
... | ... | |
151 | 151 |
|
152 | 152 |
foreach my $idx (0..$num_args - 1) { |
153 | 153 |
# Force flattening from SL::Presenter::EscapedText. |
154 |
$args[$idx] = "" . $args[$idx] if ref($args[$idx]) eq 'SL::Presenter::EscapedText';
|
|
154 |
$args[$idx] = "" . $args[$idx] if ref($args[$idx]) eq 'SL::Presenter::EscapedText';
|
|
155 | 155 |
} |
156 | 156 |
|
157 | 157 |
push @{ $self->_actions }, [ $method, @args ]; |
Auch abrufbar als: Unified diff
ClientJS: cosmetics (alignment/indentation)