Theseus has asked for the wisdom of the Perl Monks concerning the following question:

If there is a single person on this planet who has used Perlscript for ASP.NET successfully, please, speak up, because I can't find you.

I'm having a myriad of errors while trying to use this combination, and I want nothing more than to be able to make it work to save myself from having to give up Perl at work to learn VB.net or C#.

The biggest problem I'm having is that the ASP intrinsic objects aren't defined when my script launches. This means that $Response doesn't exist, so I can't call $Response->write or any other methods, this goes for the other ASP objects as well($Request, $Server, $Session, etc).

If anyone can offer any help at all, I'd be very grateful. I've scoured the internet for the solution to this problem, and I can't find a single thing.

  • Comment on ASP.NET, Perlscript, for the love of god...

Replies are listed 'Best First'.
Re: ASP.NET, Perlscript, for the love of god...
by talexb (Chancellor) on Jul 17, 2002 at 14:33 UTC
    Try this at the top of your code:
    <% use strict; use Win32::OLE; use vars qw( $Request $Response ); ...
    Add other variables $Server, etc as required to the qw list.

    --t. alex

    "Mud, mud, glorious mud. Nothing quite like it for cooling the blood!"
    --Michael Flanders and Donald Swann

      Nope, that didn't change anything that I can see.
        Theseus, did you ever get this problem of yours resolved? I'm having all the similar probs right now, but can't find any solutions and this node ends here. What's the good word? "Be proud, be a Goon"
Re: ASP.NET, Perlscript, for the love of god...
by runrig (Abbot) on Jul 17, 2002 at 00:27 UTC
    Sorry, no help here, but I hope you get it working. If we're forced to use .NET here, I'd at least like it to be perl.NET...I assume you downloaded ActiveState's Perl for ASP.NET, and not just the regular perl & PerlScript for ASP download (and read all the installation notes, which I haven't so I don't know what's in there)?
      Yep, got em both. Read the installation instructions and what sparse documentation I could find on the net.

      It's just damn frustrating to me, because I'm seeing certain features of .NET(like session variables, session state, event-based coding, and the sheer speed jump I've noticed because of the precompiled pages) that I would love to toy around with and I think could provide for some great apps, but if I can't get it working I'll never get the chance to try, and I'm out of places to go for help.

Re: ASP.NET, Perlscript, for the love of god...
by BUU (Prior) on Jul 16, 2002 at 21:00 UTC
    Have you tried just using the default perl methods? I have absolutely no experience using aps/perlscript/perl.net/whatever, but it just seems to me the logical approach to try would be just calling print or perhaps using CGI.pm methods, or using the $ENV variables.
      They don't work in ASP. print doesn't do anything in ASP, you can use it with Win32::ASP but that's basically a wrapper that overloads print to use $Response->write, which then gives me an error since there is no such object. Additionally, %ENV is not created as it would be in a CGI environment. None of the CGI/web related variables are there, only some of the ones you would see if you can the script from a console on a Win2k box. Additionally, posted variables are not fed to STDIN, so there's no way to read them. QUERY_STRING variables don't get put in %ENV, so there's no way for me to read them. Without ASP objects, I'm crippled.

      The only documentation I can find uses either Win32::ASP(which I can't use because of the error). However, the <%= $var %> syntax does work, oddly enough. However, without the full fledged power of ASP's objects or perl's functions, I can't do much of anything worthwhile.

      Weird phenomenon demonstrated below:

A reply falls below the community's threshold of quality. You may see it by logging in.