From 82eaf442d8a3bfdf6aa19dd43d64567307a0d7f8 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 23 Jan 2006 23:45:14 +0000 Subject: [PATCH] updates for the perm editor -- FM dance required git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@625 9efc2488-bf62-4759-914b-345cdb29e865 --- src/perlmods/OpenSRF/Application.pm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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}'"; -- 2.11.0