[Bio] / FigKernelPackages / Tracer.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/Tracer.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.79, Thu Nov 9 21:12:46 2006 UTC revision 1.81, Mon Feb 12 19:19:59 2007 UTC
# Line 2104  Line 2104 
2104  C<< my ($cgi, $varHash) = ScriptSetup($noTrace); >>  C<< my ($cgi, $varHash) = ScriptSetup($noTrace); >>
2105    
2106  Perform standard tracing and debugging setup for scripts. The value returned is  Perform standard tracing and debugging setup for scripts. The value returned is
2107  the CGI object followed by a pre-built variable hash.  the CGI object followed by a pre-built variable hash. At the end of the script,
2108    the client should call L</ScriptFinish> to output the web page.
2109    
2110  The C<Trace> form parameter is used to determine whether or not tracing is active and  This method calls L</ETracing> to configure tracing, which allows the tracing
2111  which trace modules (other than C<Tracer> itself) should be turned on. Specifying  to be configured via the emergency tracing form on the debugging control panel.
 the C<CGI> trace module will trace parameter and environment information. Parameters are  
 traced at level 3 and environment variables at level 4. To trace to a file instead of to  
 the web page, set C<TF> to 1. At the end of the script, the client should call  
 L</ScriptFinish> to output the web page.  
   
 In some situations, it is not practical to invoke tracing via form parameters. For this  
 situation, you can turn on emergency tracing from the debugging control panel.  
2112  Tracing will then be turned on automatically for all programs that use the L</ETracing>  Tracing will then be turned on automatically for all programs that use the L</ETracing>
2113  method, which includes every program that uses this method or L</StandardSetup>.  method, which includes every program that uses this method or L</StandardSetup>.
2114    
# Line 2974  Line 2968 
2968      my $line = <$handle>;      my $line = <$handle>;
2969      # Only proceed if we found something.      # Only proceed if we found something.
2970      if (defined $line) {      if (defined $line) {
2971          # Remove the new-line.          # Remove the new-line. We are a bit over-cautious here because the file may be coming in via an
2972          chomp $line;          # upload control and have a nonstandard EOL combination.
2973          Trace("Line read: $line") if T(File => 4);          $line =~ s/(\r|\n)+$//;
2974            # Here we do some fancy tracing to help in debugging complicated EOL marks.
2975            if (T(File => 4)) {
2976                my $escapedLine = $line;
2977                $escapedLine =~ s/\n/\\n/g;
2978                $escapedLine =~ s/\r/\\r/g;
2979                $escapedLine =~ s/\t/\\t/g;
2980                Trace("Line read: -->$escapedLine<--");
2981            }
2982          # If the line is empty, return a single empty string; otherwise, parse          # If the line is empty, return a single empty string; otherwise, parse
2983          # it into fields.          # it into fields.
2984          if ($line eq "") {          if ($line eq "") {

Legend:
Removed from v.1.79  
changed lines
  Added in v.1.81

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3