Re: Apache::ASP question: undefined subroutines
Carl Lipo wrote: Does anyone know what causes these kinds of errors? The 'subroutine' that the output is referring to is the name of the page (in this case search.htm) that is being loaded and that sits in the content directory -- there are no real missing subroutines...Maddeningly, if I hit reload enough times the page will finally load at some point and then error a few reloads later. The page (search.htm) sits on an NFS mount (could that be a problem?). Errors Output 1.Undefined subroutine InterNAP::NFT::_home_staff_carl_htdocs_apps_nft_search_htmxINL called at /usr/local/lib/site_perl/Apache/ASP.pm line 1395. , /usr/local/lib/site_perl/Apache/ASP.pm line 1397 Somehow, your perl sub that is the compiled version of a page gets undefined. In order to track down the problem, set Debug to -1, and get me the error_log output ( in a private email ) from a fresh server start until the error occurs. I need to see how the subroutine is being undefined, and whether Apache::ASP might be responsible for this. You can also try my latest dev release to see if that helps, but I don't think we'll be solving the real problem if we did that. What version are you running BTW? --Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Re: VBScript parser (was Re: Apache::ASP Question)
[EMAIL PROTECTED] wrote: -- On Mon, 24 Jul 2000 13:19:51 Joshua Chamas wrote: Until I write a VBScript to perl parser, yes you can only use perl under Apache::ASP. Ok, so are you actually going to write a VBScript to perl parser? I was actually thinking of undertaking this project myself, but I've never written a lexer or a parser or anything like that. If you _are_ going to do this I'd be glad to help. If not, I'm probably going to get started with it anyways. I realized a huge need for something like this since I've been working on a large site (high volume + large codebase) converting from WinNT/ASP to Solaris/Perl/CGI (with mod_perl of course). I've written a _really_ simple script that converts stuff like "For i = 1 To 10" to "for (1..10) {" etc., but it's of course really flaky and unreliant (although it knocks out about 90% of the manual code conversion). Ok, so what was the point again?? Oh yeah, are you really going to do this? :-) Or is someone else already in the process? Like Matt suggested you can start with his simple vbscript to perlscript converter, but I would recommend to do a really complete job that you use a full on grammar and something like Parse::Yapp to do the parse tree. I personally would find this approach the most enjoyable, but it may be that the parse times that result from this are too slow, and you might need to take the approach that Matt did and brute force your way through the code to render to perlscript. I have not started on this, and likely would not for a while yet so feel free to have at it. If you decomped this functionality into a module like Parse::VBScript or some such ( I don't know about this CPAN namespace ) and presented an interface like: my $vbparser = Parse::VBScript-new($string_ref); my $perlscript_ref = $vbparser-perlscript(); this interface would allow me to use your code from Apache::ASP easily by passing the VBScript code into the parser, and get the equivalent perlscript. The passing by ref would just save on some of the string copying that may be unnecessary otherwise. There is a HUGE need for this vbscript emulation, and this would greatly add to the functionality of Apache::ASP, so many thanks ahead of time! -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Re: VBScript parser (was Re: Apache::ASP Question)
On Tue, 25 Jul 2000, Joshua Chamas wrote: Like Matt suggested you can start with his simple vbscript to perlscript converter, but I would recommend to do a really complete job that you use a full on grammar and something like Parse::Yapp to do the parse tree. I personally would find this approach the most enjoyable, but it may be that the parse times that result from this are too slow, and you might need to take the approach that Matt did and brute force your way through the code to render to perlscript. Well you might find this interesting: http://compilers.iecc.com/comparch/article/00-05-085 Sounds a lot like parsing perl :-) -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
Re: VBScript parser (was Re: Apache::ASP Question)
| so are you actually going to write a VBScript to perl parser? I was actually | thinking of undertaking this project myself, but I've never written a lexer | or a parser or anything like that. For what it's worth: Some months ago I was facing the problem of moving several ASP scripted IIS/Microsoft SQL sites to a Unix Apache/mySQL server. And instead of doing things by hand, I wrote a tool do do the conversion. It did the trick for the projects I initially intended it for. But after extending functionality over and over together with a collegue who's perl knowledge is far less advanced, I finally abonded development of my tool when it reached 1500 obfuscated lines of perl code and things got unreadible even for myself. I am planning to do a complete OO rewrite someday - but my resources are very limited at the moment. For basic VBScripting and it generates working stand-alone perl scripts suitable for plain CGI and mod_perl, test it on http://www.guru4hire.nl/asp2pl Let me know if someone starts with Parse::VBScript, I am willing to contribute. Ime
Re: Apache::ASP Question
"V" == Victor [EMAIL PROTECTED] writes: V I also wanted a clarification of ASP. As I understand it, ASP is M$'s V version of VB that runs in a way similar to how php does? Is ASP a V language or ... ? Does Apache::ASP support the vb syntax ? No, ASP on M$ is _usually_ written in VB. It is not a language, but a framework; You can write ASP pages in any language. Apache::ASP lets you do it in Perl.
Re: Apache::ASP Question
So to move a page written in VB to unix, I'd need something like ChilliSoft ? Vivek Khera wrote: "V" == Victor [EMAIL PROTECTED] writes: V I also wanted a clarification of ASP. As I understand it, ASP is M$'s V version of VB that runs in a way similar to how php does? Is ASP a V language or ... ? Does Apache::ASP support the vb syntax ? No, ASP on M$ is _usually_ written in VB. It is not a language, but a framework; You can write ASP pages in any language. Apache::ASP lets you do it in Perl.
Re: Apache::ASP Question
On Mon, 24 Jul 2000, Victor wrote: I am trying to figure out what Apache::ASP is and how well it works. Can anyone point me to information on the following points or provide me with answers to the following? 1. How compatible is Apache::ASP with ASP? Pretty good - I worked with Joshua a long time ago to make sure that the PerlScript and Apache::ASP were compatible. Apache::ASP scripts are not necessarily compatible with PerlScript though, because they provide a richer API, and some short-cuts. 2. How well does Apache::ASP perform? Pretty good. Probably about as well as PerlScript, or better. Not as good as VBScript ASP's though. See the benchmarks linked to from http://perl.apache.org/ 3. Can Apache::ASP use COM? Only on windows, via the Win32::OLE module. 4. What platforms does Apache::ASP run on? All of them. :-) I also wanted a clarification of ASP. As I understand it, ASP is M$'s version of VB that runs in a way similar to how php does? Is ASP a language or ... ? Does Apache::ASP support the vb syntax ? ASP is a cross platform API, not a language. Apache::ASP implements the API that ActiveState's PerlScript and MKS' PScript implements. -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
Re: Apache::ASP Question
"V" == Victor [EMAIL PROTECTED] writes: V So to move a page written in VB to unix, I'd need something like ChilliSoft V ? Perhaps. Or maybe the ASP to PHP converter will do it for you? I hear rumors of such a thing that will convert your M$ ASP to php. But that's not Perl... ;-) -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D.Khera Communications, Inc. Internet: [EMAIL PROTECTED] Rockville, MD +1-301-545-6996 GPG MIME spoken herehttp://www.khera.org/~vivek/
Re: Apache::ASP Question
Victor wrote: So to move a page written in VB to unix, I'd need something like ChilliSoft ? Until I write a VBScript to perl parser, yes you can only use perl under Apache::ASP. I found VBScript to be an utterly crippled language a couple years ago when I started this project but I absolutely loved ASP with session management, nice API, excellence scripting syntax etc. A note about performance... VBScript does extremely well on small trivial scripts. Perl's runtime strength lies in larger more complex programs. The same is true when looking at perl vs. PHP. An unofficial benchmark I heard for a real application was that a script ported to Apache::ASP with heavy DBD::Oracle access had 10 times better performance than the original ASP script under NT/IIS on the same hardware. Note that Apache::ASP itself is very fast, and only slightly slower than Apache::Registry CGI scripts. Further, you get other performance advantages when using perl database access, and Apache, than when under NT/IIS/ASP. The benchmarks at http://www.chamas.com/bench don't capture these differences because the "Hello World" bench is so simple, and only test startup speed differences, not runtime language advantages. Yes, we need a better benchmark, but these things take a lot of time. :) -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051