From: miker Date: Mon, 23 Jan 2006 23:45:14 +0000 (+0000) Subject: updates for the perm editor -- FM dance required X-Git-Tag: osrf_rel_2_0_1~1248 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=82eaf442d8a3bfdf6aa19dd43d64567307a0d7f8;p=OpenSRF.git updates for the perm editor -- FM dance required git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@625 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/perlmods/OpenSRF/Application.pm b/src/perlmods/OpenSRF/Application.pm index 116718b..c323182 100644 --- a/src/perlmods/OpenSRF/Application.pm +++ b/src/perlmods/OpenSRF/Application.pm @@ -152,9 +152,10 @@ sub handler { $coderef->api_name." : requires ". $coderef->argc } if (@args) { - if (exists $coderef->signature->{params}) { - for my $p (0 .. scalar(@{ $coderef->signature->{params} }) - 1 ) { - my $s = $coderef->signature->{params}->[$p]; + my $sig = $coderef->signature; + if ($sig && exists $sig->{params}) { + for my $p (0 .. scalar(@{ $sig->{params} }) - 1 ) { + my $s = $sig->{params}->[$p]; my $a = $args[$p]; if ($s->{class} && JSON->lookup_hint(ref $a) ne $s->{class}) { die "Incorrect param class at position $p : should be a '$$s{class}'"; @@ -230,9 +231,10 @@ sub handler { $aref->[2]->api_name." : requires ". $aref->[2]->argc } if (@args) { - if (exists $aref->[2]->signature->{params}) { - for my $p (0 .. scalar(@{ $aref->[2]->signature->{params} }) - 1 ) { - my $s = $aref->[2]->signature->{params}->[$p]; + my $sig = $aref->[2]->signature; + if ($sig && exists $sig->{params}) { + for my $p (0 .. scalar(@{ $sig->{params} }) - 1 ) { + my $s = $sig->{params}->[$p]; my $a = $args[$p]; if ($s->{class} && JSON->lookup_hint(ref $a) ne $s->{class}) { die "Incorrect param class at position $p : should be a '$$s{class}'";