1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<% encode_json( $return ) %>\ <%init> my $return; my($custnum, $svcnum) = $cgi->keywords; if ( $custnum =~ /^(\d+)$/ ) { use FS::Maestro; $return = FS::Maestro::customer_status($1, $svcnum); } else { $return = { 'error' => 'No custnum' }; } </%init>