I had an error!  One of the times I refeshed the page, I got this to dump.

Thanks for looking!

Error during compilation of C:\Apache\htdocs\temp\index.html:
HTML::Mason::Commands::recurse() called too early to check prototype at C:\Apache\htdocs\temp\index.html line 22.
 
 

Trace begun at c:/Perl/site/lib/HTML/Mason/Interp.pm line 597
HTML::Mason::Interp::_compilation_error('HTML::Mason::Interp=HASH(0x18db004)', 'C:\Apache\htdocs\temp\index.html', 'Error during compilation of :^JHTML::Mason::Commands::recurse() called too early to check prototype at C:\Apache\htdocs\temp\index.html line 22.^J^J^JStack:^J  [c:/Perl/site/lib/Exception/Class.pm:153]^J  [c:/Perl/site/lib/HTML/Mason/Interp.pm:574]^J  [c:/Perl/site/lib/HTML/Mason/Interp.pm:326]^J  [c:/Perl/site/lib/HTML/Mason/Request.pm:201]^J  [c:/Perl/site/lib/HTML/Mason/Request.pm:168]^J  [c:/Perl/site/lib/HTML/Mason/ApacheHandler.pm:60]^J  [c:/Perl/site/lib/Class/Container.pm:265]^J  [c:/Perl/site/lib/Class/Container.pm:343]^J  [c:/Perl/site/lib/HTML/Mason/Interp.pm:232]^J  [c:/Perl/site/lib/HTML/Mason/ApacheHandler.pm:853]^J  [c:/Perl/site/lib/HTML/Mason/ApacheHandler.pm:780]^J  [(eval 33):8]^J  [nul:0]^J') called at c:/Perl/site/lib/HTML/Mason/Interp.pm line 332
HTML::Mason::Interp::load('HTML::Mason::Interp=HASH(0x18db004)', '/temp/index.html') called at c:/Perl/site/lib/HTML/Mason/Request.pm line 201
eval {...}('HTML::Mason::Interp=HASH(0x18db004)', '/temp/index.html') called at c:/Perl/site/lib/HTML/Mason/Request.pm line 188
HTML::Mason::Request::_initialize('HTML::Mason::Request::ApacheHandler=HASH(0x18db0f4)') called at c:/Perl/site/lib/HTML/Mason/Request.pm line 168
HTML::Mason::Request::new('HTML::Mason::Request::ApacheHandler', 'error_format', 'html', 'error_mode', 'output', 'interp', 'HTML::Mason::Interp=HASH(0x18db004)', 'comp', '/temp/index.html', 'args', 'ARRAY(0x18dfb30)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0x18de2e0)', 'apache_req', 'Apache::Request=SCALAR(0x18e38f4)') called at c:/Perl/site/lib/HTML/Mason/ApacheHandler.pm line 60
HTML::Mason::Request::ApacheHandler::new('HTML::Mason::Request::ApacheHandler', 'error_format', 'html', 'error_mode', 'output', 'interp', 'HTML::Mason::Interp=HASH(0x18db004)', 'comp', '/temp/index.html', 'args', 'ARRAY(0x18dfb30)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0x18de2e0)', 'apache_req', 'Apache::Request=SCALAR(0x18e38f4)') called at c:/Perl/site/lib/Class/Container.pm line 265
Class::Container::call_method('HTML::Mason::Interp=HASH(0x18db004)', 'request', 'new', 'interp', 'HTML::Mason::Interp=HASH(0x18db004)', 'comp', '/temp/index.html', 'args', 'ARRAY(0x18dfb30)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0x18de2e0)', 'apache_req', 'Apache::Request=SCALAR(0x18e38f4)') called at c:/Perl/site/lib/Class/Container.pm line 343
Class::Container::create_delayed_object('HTML::Mason::Interp=HASH(0x18db004)', 'request', 'interp', 'HTML::Mason::Interp=HASH(0x18db004)', 'comp', '/temp/index.html', 'args', 'ARRAY(0x18dfb30)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0x18de2e0)', 'apache_req', 'Apache::Request=SCALAR(0x18e38f4)') called at c:/Perl/site/lib/HTML/Mason/Interp.pm line 232
HTML::Mason::Interp::make_request('HTML::Mason::Interp=HASH(0x18db004)', 'comp', '/temp/index.html', 'args', 'ARRAY(0x18dfb30)', 'ah', 'HTML::Mason::ApacheHandler=HASH(0x18de2e0)', 'apache_req', 'Apache::Request=SCALAR(0x18e38f4)') called at c:/Perl/site/lib/HTML/Mason/ApacheHandler.pm line 853
HTML::Mason::ApacheHandler::prepare_request('HTML::Mason::ApacheHandler=HASH(0x18de2e0)', 'Apache=SCALAR(0x18e3894)') called at c:/Perl/site/lib/HTML/Mason/ApacheHandler.pm line 780
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x18de2e0)', 'Apache=SCALAR(0x18e3894)') called at (eval 33) line 8
HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache=SCALAR(0x18e3894)') called at nul line 0
eval {...}('HTML::Mason::ApacheHandler', 'Apache=SCALAR(0x18e3894)') called at nul line 0

Doug Dawson wrote:

Hello!

I am trying to adapt a CLI Perl script to work in a web page with Mason.
I pretty much dumped the code between <%perl> tags and tried to view the
page. The Apache process spawns at max CPU usage and doesn't stop. I
have to kill the process. Can anyone offer a suggestion?

(You'll see some commented out HTML as I was preparing to convert the
output to HTML)

Thanks!

<%perl>
use strict;

my $server_root = '/opt/apache/htdocs/some_dir';

sub recurse($) {
  my($path) = @_;

  ## append a trailing / if it's not there
  #$path .= '/' if($path !~ /\/$/);

  ## print the directory being searched
  #print $path,"\n";

  ## Display in HTML table

  ## loop through the files contained in the directory
 #print "<ul>";
  for my $eachFile (glob($path.'*')) {

    ## if the file is a directory
    if( -d $eachFile) {
      ## pass the directory to the routine ( recursion )
      recurse($eachFile);
    } else {

      ## print the file ... tabbed for readability
      print $eachFile;
    }
  }
 #print "</ul>";
}

</%perl>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Untitled Document</title>

</head>
<body>
<%perl>
recurse($server_root);
</%perl>
</body>
</html>

--
Doug Dawson
Application Developer
Physicians Mutual Insurance Company
(402) 930-2432

The problem with troubleshooting is that trouble shoots back.

____________________________________________________________
This message and any attachments are confidential, may contain privileged
information, and are intended solely for the recipient named above.
If you are not the intended recipient, or a person responsible for
delivery to the named recipient, you are notified that any review,
distribution, dissemination or copying is prohibited.  If you have
received this message in error, you should notify the sender by return
email and delete the message from your computer system.

  ------------------------------------------------------------------------
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

  ------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

--
Doug Dawson
Application Developer
Physicians Mutual Insurance Company
(402) 930-2432

I like rice. Rice is great if you're hungry and want 2000 of something.
 

____________________________________________________________
This message and any attachments are confidential, may contain privileged
information, and are intended solely for the recipient named above.
If you are not the intended recipient, or a person responsible for
delivery to the named recipient, you are notified that any review,
distribution, dissemination or copying is prohibited.  If you have
received this message in error, you should notify the sender by return
email and delete the message from your computer system.
begin:vcard 
n:Dawson;Doug
tel;work:402.930.2432
x-mozilla-html:FALSE
url:http://www.physiciansmutual.com
org:;ETG
adr:;;2600 Dodge St.;Omaha;NE;68131;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Programmer
fn:Doug Dawson
end:vcard
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to