You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Thanos Chatziathanassiou <tc...@arx.gr> on 2003/11/24 17:27:23 UTC

Re: Converting ASP/VBScript COM reference to Apache::ASP Perl COM ref erence

Why not try something like:
my $proc = Win32::OLE->new('Project.clsInitialClass') or die 
Win32::OLE->LastError();
$proc->Application  = $Application;
...etc
maybe this will help you figure out the problem.
oh, and drop the ``my'' in ``my $proc->Application''...

another thing: is $proc->Application a property or a method ? Looks like 
a property to me.
VB doesn't care, but a property in perl should be written as 
$proc->{Application}

Regards,
Thanos Chatziathanassiou

Reggie Dindiyal wrote:

> Hello everyone,
>
> I'm trying to convert
> <%
> Dim proc
>
> Set proc = Server.CreateObject("Project.clsInitialClass")
> Set proc.Application = Application
> Set proc.Request = Request
> Set proc.Response = Response
> Set proc.Server = Server
> Set proc.Session = Session
> proc.LoadPage("D:\RootConfig\config.inc");
> %>
>
> into something that Apache::ASP will understand.  This is an ASP page 
> that I use to communicate with a COM object written in VB.  I'm 
> passing in a text file (called config.inc) and I process it and write 
> outputs to the browser.  It works great in ASP on IIS.  Here's my 
> attempt and the error returned:
>
>   -: use strict;;;use vars qw($Application $Session $Response $Server 
> $Request);;
>   -: #line 1 d:/websites/default.asp
>   1: ;;
>   2: use Win32::OLE;
>   3: use strict;
>   4:
>   5: my $proc = Win32::OLE->new('Project.clsInitialClass');
>   6: my $proc->Application = $Application;
>   7: my $proc->Request = $Request;
>   8: my $proc->Response = $Response;
>   9: my $proc->Server = $Server;
>  10: my $proc->Session = $Session;
>  11: $proc->LoadPage("D:\RootConfig\config.inc");
>
>
>
>
> Errors Output
> Can't call method "Application" on an undefined value at 
> d:/websites/default.asp line 6. , D:/Perl/site/lib/Apache/ASP.pm line 1514
>
>
>
>
> It seems to be failing at line 6 $proc->Application ( i know that's 
> the first point of failure becuase i changed the name of application 
> to something else, and the error returned had that changed name when I 
> re-ran it).
>
> I've tried many things and at this point, I'm stumped.  Any ideas?
>
> Thanks.
>
>  
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org