[Komodo-3-beta] Setup to debug mason or mod_perl programs
by Gilbert Rebeiro other posts by this author
Jun 28 2004 11:03AM messages near this date
view in the new Beta List Site
[Komodo-3-beta] beta bugs available again...
|
Re: [Komodo-3-beta] Python CodeIntelligence still disabled after update
<html> <div style='background-color:'><DIV class=RTE>
<P> Hi,</P>
<P> I just installed the beta and would like to know if there is a faq or howto or if
it is possibe to debug mason or mod_perl programs.</P>
<P> Thanks in advance for your help.</P>
<P> Best regards,</P>
<P> Gilbert Rebeiro.</P>
<P> <BR>Here is a sample of the code I am trying to debug:</P>
<P> </P>
<P> <!-- mason kludge --><BR>%<BR>%<BR>%#untaint invnum<BR>%my($query) = $cgi->keywo
rds;<BR> %$query =~ /^(\d+)$/;<BR>%my $invnum = $1;<BR>%<BR>%my $cust_bill = qsearchs('cust_b
ill',{'invnum'=>$invnum});<BR> %die "Invoice #$invnum not found!" unless $cust_bill;<BR>%m
y $custnum = $cust_bill->getfield('custnum');<BR> %<BR>%#my $printed = $cust_bill->prin
ted;<BR> %<BR>%print header('Invoice View', menubar(<BR>% "Main Menu" => $p,<BR>%&nb
sp; "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",<BR> %));<BR>%<B
R> %print qq!<A HREF="${p}edit/cust_pay.cgi?$invnum">Enter payments (check/cash) ag<BR>
ainst this invoice</A> | !<BR> % if $cust_bill->owed > 0;<BR>%<BR>%print qq
!<A HREF="${p}misc/print-invoice.cgi?$invnum">Reprint this invoice</A>!<BR> ;<BR>
%if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) {<BR> % print
qq! | <A HREF="${p}misc/email-invoice.cgi?$invnum">!.<BR> %&nbs!
p; qq!Re-email this invoice</A>!;<BR> %}<BR>%<BR>%
print '<BR><BR>';<BR> %<BR>%my $conf = new FS::Conf;<BR>%if ( $conf->exists('i
nvoice_latex') ) {<BR> % print menubar(<BR>% 'View typeset invoice' =
> "${p}view/cust_bill-pdf.cgi?$invnum.pdf",<BR> % ), '<BR><BR>';<BR>%}<B
R> %<BR>%#false laziness with search/cust_bill_event.cgi<BR>%<BR>%print table(). '<TR>&
lt;TH>Event</TH><TH>Date</TH><TH>Status</TH></TR>';<B
R> %foreach my $cust_bill_event (<BR>% sort { $a->_date <=> $b->_date } $cu
st_bill->cust_bill_event<BR> %) {<BR>% my $status = $cust_bill_event->status;<BR>
% $status .= ': '. $cust_bill_event->statustext if $cust_bill_event->statustext<
BR> ;<BR>% print '<TR><TD>'. $cust_bill_event->part_bill_event->event
. '</TD><TD>'.<BR> % &n!
bsp; time2str("%a %b %e %T %Y", $cust_bill_event->_date). '</TD&
gt;<TD>'.<BR> % $status. '</TD></TR&
gt;';<BR> %}<BR>%print '</TABLE><BR><PRE>';<BR>%<BR>%print $cust_bill->p
rint_text;<BR> %<BR>% #formatting<BR>% &
nbsp; print <<END;<BR> % </PRE></FONT><BR>%&n
bsp; </BODY><BR> %</HTML><BR>%END<BR>%<BR>%<BR><BR></P></DIV></div><br clear=all>
<hr> MSN 8 with <a href="http://g.msn.com/8HMAENCA/2740??PS=47575">With MSN Premium </a> Get
2 Months FREE* </html>
|