start with https://www.perl.org/books/beginning-perl/, then to read
http://www.masonbook.com/
for Perl you have the perl debugger http://perldoc.perl.org/perldebug.html,
you can run tests scripts to debug your templates with it
HTML::Mason is compiled into Perl code and ran on the backend and the
output, including the js code is sent to the browser; the javascript runs
in the browser: you can't debug them in the same time
On Thu, Sep 11, 2014 at 12:58 PM, -, - <fract...@mailbox.hu> wrote:
> Dear Mason-users!
>
> I'm a software developer from Hungary. We've got a large code which is a
> mix of HTML, Perl, and special Mason commands. Our task is to understand,
> maintain and develop this code.
>
> My question: is there any tool out there which we were able to debug our
> code effectivly? We would like to use breakpoints, step into and step over
> functions, watch variables while the code is running line-by-line, etc...
> Or... is there any way for example to force Komodo or Eclipse to
> handle/able to debug Mason code?
>
> Our giant code has the structure shown below:
>
> <script type="text/javascript">
> function validateform() {
> var example1 = /example/;
> var example2 = example;
> <JAVASCRIPT CODE HERE>
> (function($) {
> $(document).ready(function(){
> var msg = '<% $message %>';
> });
> })(jQuery);
> </script>
>
> <link rel="stylesheet" type="text/css" href="css/stylesheet.css" />
> <div id="debug" style="display:none"></div>
> % if ($info->{attr_changed} =~ /y/) {
> <div class="alert-status" >
> <EXAMPLE>
> </div>
> % }
>
>
> <%method example>
> <%init>
> my $f = $path;
> my $result = open my $fh, "<", $f;
>
> if(!$result) {
> die "Couldn't open '".$f."' for reading because: ".$!;
> }
>
> my $line_counter;
> while(!eof $fh) {
> $line_counter++;
> my $line = readline $fh;
> if (index($line, $userinput) > 0) {
> print "EXAMPLE"\n";
> print "\n" . $line =~
> m/($userinput)/;
> }
> }
> </%init>
> </%method>
>
>
>
> We would like to debug our Mason/Javascript/Perl code line-by-line and
> watching the variables meanwhile. Is it possible?
> Our problem is that for example Firebug never displays the mason scripts
> and the Perl code... so I'm unable to put breakpoints into the code, etc.
>
> Please help!
>
> Thank you very much for your answer,
> Regards,
> Zoltan Trencsenyi
>
>
> ------------------------------------------------------------------------------
> Want excitement?
> Manually upgrade your production database.
> When you want reliability, choose Perforce
> Perforce version control. Predictably reliable.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
> _______________________________________________
> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users
>
>
--
==================================
Emil Perhinschi http://www.lunch-break.ro
==================================
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users