Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th April 2006, 06:48
savimonty savimonty is offline
Junior Member
 
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question Calling $Response->Write from perl

Hi,

I need to know how to call ASP Object calls from a perl script.

for eg:

I tried the following ...

# trial.pl
use Apache::ASP::Response;

$Response = Apache::ASP::Response;
$Response->Write("Hello World");

#This should print Hello World on the console...!!

This is what i precisely want to do ...
I am sure I am making a mistake somewhere ... guide me with this.

Thanks a milliion

Savio.

Last edited by savimonty; 7th April 2006 at 06:54.
Reply With Quote
Sponsored Links
  #2  
Old 7th April 2006, 06:58
sbovisjb1 sbovisjb1 is offline
Senior Member
 
Join Date: Feb 2006
Posts: 176
Thanks: 0
Thanked 1 Time in 1 Post
Default Couldnt say it better my self

http://forums.devshed.com/perl-progr...ache-7911.html
Reply With Quote
  #3  
Old 7th April 2006, 07:02
sbovisjb1 sbovisjb1 is offline
Senior Member
 
Join Date: Feb 2006
Posts: 176
Thanks: 0
Thanked 1 Time in 1 Post
Default

If you are interested in writing Perl in Apache i suggest that you use these tutorials.
http://www.perlscripten.de/modules.p...=print&sid=215
http://httpd.apache.org/docs/2.0/howto/cgi.html
Reply With Quote
  #4  
Old 7th April 2006, 07:05
savimonty savimonty is offline
Junior Member
 
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default did not help ...

Hi,

Thanks for the reply ... but this is not the problem I am facing....

I am not trying to run a CGI script!

I am trying to use the Apache::ASP library which is written completely in perl.

So, I want to use this library to run ASP Object calls from another perl script file

For example, consider a perl file : call_Response.pl
######################################
# call_Response.pl
#####################################
# Creating the $Response object

use Apache::ASP::Response; ### i think i am garbling here....

$Response = Apache::ASP::Response; ### here too
$Response->Write("Hello World"); #Prints "Hello World" on the console


## Now this is not just for the $Response Object .... I will need to call other objects also.
## Like the $Server and the $Session object calls.

###################################

Now at the prompt I should get the following

$perl call_Response.pl
Hello World

I hope this fine-tunes the problem.

Thanks.
Savio

Last edited by savimonty; 7th April 2006 at 07:12.
Reply With Quote
  #5  
Old 7th April 2006, 11:55
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Do you find any errors in the logs?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 7th April 2006, 16:03
savimonty savimonty is offline
Junior Member
 
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default The error I see ...

$perl call_Response.pl
############ ERROR ###############

Undefined subroutine &Apache::ASP::config called at /usr/share/perl5/Apache/ASP/Response.pm line 467

###################################

.... where Response.pm is a asp-perl package containing the method write() and the other methods.

config() is already referenced explicitly in the file Response.pm

So, I do not understand why this is a problem!

Also when I write an ASP scripted in perl and run it using the command asp-perl trial.asp

It works just fine ...
But if I use a normal perl script (NOT asp-perl) to call these methods... it gives me this error.

If necessary I will attach the Response.pm file here. ...

I feel I am making a minor error in declaring the object, $Response.
If so I need to know the correct syntax.

Well, Hope to get a solution to this....!!
Thanks,
Savio.

Last edited by savimonty; 7th April 2006 at 16:14.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl and cgi script installation linuxuser1 General 30 26th April 2006 23:09
Perl non-printable chars and unwanted formatting spinoza Programming/Scripts 4 1st April 2006 20:30
perl and suse 9.3 problem shajazzi Installation/Configuration 3 30th March 2006 16:15
PERL scripts in Mozilla Browser Deepthi Server Operation 3 20th December 2005 14:01
Installing Perl modules fernando Installation/Configuration 1 10th May 2005 20:16


All times are GMT +2. The time now is 05:34.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.