ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> komodo-beta
komodo-beta
[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> &nbsp; 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> &nbsp;</P>
<P> &lt;!-- mason kludge --&gt;<BR>%<BR>%<BR>%#untaint invnum<BR>%my($query) = $cgi-&gt;keywo
rds;<BR> %$query =~ /^(\d+)$/;<BR>%my $invnum = $1;<BR>%<BR>%my $cust_bill = qsearchs('cust_b
ill',{'invnum'=&gt;$invnum});<BR> %die "Invoice #$invnum not found!" unless $cust_bill;<BR>%m
y $custnum = $cust_bill-&gt;getfield('custnum');<BR> %<BR>%#my $printed = $cust_bill-&gt;prin
ted;<BR> %<BR>%print header('Invoice View', menubar(<BR>%&nbsp; "Main Menu" =&gt; $p,<BR>%&nb
sp; "View this customer (#$custnum)" =&gt; "${p}view/cust_main.cgi?$custnum",<BR> %));<BR>%<B
R> %print qq!&lt;A HREF="${p}edit/cust_pay.cgi?$invnum"&gt;Enter payments (check/cash) ag<BR>
ainst this invoice&lt;/A&gt; | !<BR> %&nbsp; if $cust_bill-&gt;owed &gt; 0;<BR>%<BR>%print qq
!&lt;A HREF="${p}misc/print-invoice.cgi?$invnum"&gt;Reprint this invoice&lt;/A&gt;!<BR> ;<BR>
%if ( grep { $_ ne 'POST' } $cust_bill-&gt;cust_main-&gt;invoicing_list ) {<BR> %&nbsp; print
 qq! | &lt;A HREF="${p}misc/email-invoice.cgi?$invnum"&gt;!.<BR> %&nbs!
 p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qq!Re-email this invoice&lt;/A&gt;!;<BR> %}<BR>%<BR>%
print '&lt;BR&gt;&lt;BR&gt;';<BR> %<BR>%my $conf = new FS::Conf;<BR>%if ( $conf-&gt;exists('i
nvoice_latex') ) {<BR> %&nbsp; print menubar(<BR>%&nbsp;&nbsp;&nbsp; 'View typeset invoice' =
&gt; "${p}view/cust_bill-pdf.cgi?$invnum.pdf",<BR> %&nbsp; ), '&lt;BR&gt;&lt;BR&gt;';<BR>%}<B
R> %<BR>%#false laziness with search/cust_bill_event.cgi<BR>%<BR>%print table(). '&lt;TR&gt;&
lt;TH&gt;Event&lt;/TH&gt;&lt;TH&gt;Date&lt;/TH&gt;&lt;TH&gt;Status&lt;/TH&gt;&lt;/TR&gt;';<B
R> %foreach my $cust_bill_event (<BR>%&nbsp; sort { $a-&gt;_date &lt;=&gt; $b-&gt;_date } $cu
st_bill-&gt;cust_bill_event<BR> %) {<BR>%&nbsp; my $status = $cust_bill_event-&gt;status;<BR>
%&nbsp; $status .= ': '. $cust_bill_event-&gt;statustext if $cust_bill_event-&gt;statustext<
BR> ;<BR>%&nbsp; print '&lt;TR&gt;&lt;TD&gt;'. $cust_bill_event-&gt;part_bill_event-&gt;event
. '&lt;/TD&gt;&lt;TD&gt;'.<BR> %&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n!
 bsp; time2str("%a %b %e %T %Y", $cust_bill_event-&gt;_date). '&lt;/TD&
gt;&lt;TD&gt;'.<BR> %&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $status. '&lt;/TD&gt;&lt;/TR&
gt;';<BR> %}<BR>%print '&lt;/TABLE&gt;&lt;BR&gt;&lt;PRE&gt;';<BR>%<BR>%print $cust_bill-&gt;p
rint_text;<BR> %<BR>%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #formatting<BR>%&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp; print &lt;&lt;END;<BR> %&nbsp;&nbsp;&nbsp; &lt;/PRE&gt;&lt;/FONT&gt;<BR>%&n
bsp; &lt;/BODY&gt;<BR> %&lt;/HTML&gt;<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> 

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved