Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ASP

Calling $Response->Write

 

 

ModPerl asp RSS feed   Index | Next | Previous | View Threaded


savimonty at donboscoit

Apr 6, 2006, 9:41 PM

Post #1 of 9 (7851 views)
Permalink
Calling $Response->Write

Hi,
I would like to know how to call any Apache::ASP object call from a perl
script.
I need to know which package should I "use" to do this ...!

The intent of doing this is to use perl_call's

call_mathod(.... $Response->Write().....) ....

to call these ASP object methods.

Can someone please help me ASAP.

Thanks a million.
Savio.
--
View this message in context: http://www.nabble.com/Calling-%24Response-%3EWrite-t1410025.html#a3797532
Sent from the Apache - Asp forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


skylos at gmail

Apr 7, 2006, 8:58 AM

Post #2 of 9 (7597 views)
Permalink
Re: Calling $Response->Write [In reply to]

You set up mod_perl per documentation with the Apache::ASP module and
in your perlscript scripts handled by the appropriate handler, the
$Response object is scoped. Its as simple as that.

David


On 4/6/06, savimonty <savimonty [at] donboscoit> wrote:
>
> Hi,
> I would like to know how to call any Apache::ASP object call from a perl
> script.
> I need to know which package should I "use" to do this ...!
>
> The intent of doing this is to use perl_call's
>
> call_mathod(.... $Response->Write().....) ....
>
> to call these ASP object methods.
>
> Can someone please help me ASAP.
>
> Thanks a million.
> Savio.
> --
> View this message in context: http://www.nabble.com/Calling-%24Response-%3EWrite-t1410025.html#a3797532
> Sent from the Apache - Asp forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: asp-unsubscribe [at] perl
> For additional commands, e-mail: asp-help [at] perl
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


savimonty at donboscoit

Apr 10, 2006, 2:19 AM

Post #3 of 9 (7603 views)
Permalink
Re: Calling $Response->Write [In reply to]

Thanks.

Well, I did not understand what you tried to say.... sorry..!! Just a Novice
to perl
But this is what I want to do. ...

I have a file trial.pl

######## HERE IT IS : trial.pl ####
# What package do I have to import to use the Object method like
$Response->Write()

use Apache::ASP::Response;
$Response = Apache::ASP::Response;
# Is this the right way to create $Response object ...?????? or any other
ASP::Perl object

$Response->Write("Hello, world!!\n");
$Response->...... and so on....
######################################################

I hope you are getting what I am looking for.

Thanks a million...!!

Regards,
Savio Monteiro
--
View this message in context: http://www.nabble.com/Calling-%24Response-%3EWrite-from-perl-t1410025.html#a3838392
Sent from the Apache - Asp forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


concept at conceptonline

Apr 10, 2006, 2:24 AM

Post #4 of 9 (7573 views)
Permalink
Re: Calling $Response->Write [In reply to]

Hi,

>Thanks.
>
>Well, I did not understand what you tried to say.... sorry..!! Just a Novice
>to perl
>But this is what I want to do. ...
>
>I have a file trial.pl
>
>######## HERE IT IS : trial.pl ####
># What package do I have to import to use the Object method like
>$Response->Write()
>
>
Usually you run Apace::ASP from Apache (nomen est omen ;)) In that case,
all objects are already created for you - and you do not have a .pl
script but a .asp "script", like

index.asp :
<%
$Response->Write("Hello, world!");
%>


- Fagzal

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


savimonty at donboscoit

Apr 10, 2006, 5:17 AM

Post #5 of 9 (7581 views)
Permalink
Re: Calling $Response->Write [In reply to]

Well, thanks again,

I am not trying to run an ASP script...!!
I know how to do that...!!

I know that the ASP objects are created for me once the deelimiters are
encountered!!
I want to use the ASP objects from a perl script, I want to use them
raw. I hope you understand me now..!!

Thanks anyways..
Regards,
Savio.
--
View this message in context: http://www.nabble.com/Calling-%24Response-%3EWrite-from-perl-t1410025.html#a3840636
Sent from the Apache - Asp forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


concept at conceptonline

Apr 10, 2006, 5:45 AM

Post #6 of 9 (7582 views)
Permalink
Re: Calling $Response->Write [In reply to]

Hi Savio,

Okay, sorry that I misunderstood you.

I think you can do what you want - as the matter of fact, I used
Apache::ASP once as a "templating engine". It's not exactly what you are
looking for, though...

What I know is that you can create an Apache::ASP instance like

my $ASP = Apache::ASP->new($r);

where $r is - in this case - a mod_perl Apache request object (I guess a
CGI object would also do). So in theory I *guess* you could do something
like

use Apache::ASP;
use CGI;
my $r = new CGI;
my $asp = Apache::ASP->new($r);
my $Response = $asp->{Response};
$Response->Write("Hello, World!");

...even though this looks rather ugly.

- Fagzal



>Well, thanks again,
>
>I am not trying to run an ASP script...!!
>I know how to do that...!!
>
>I know that the ASP objects are created for me once the deelimiters are
>encountered!!
>I want to use the ASP objects from a perl script, I want to use them
>raw. I hope you understand me now..!!
>
>Thanks anyways..
>Regards,
>Savio.
>--
>View this message in context: http://www.nabble.com/Calling-%24Response-%3EWrite-from-perl-t1410025.html#a3840636
>Sent from the Apache - Asp forum at Nabble.com.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: asp-unsubscribe [at] perl
>For additional commands, e-mail: asp-help [at] perl
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


savimonty at donboscoit

Apr 10, 2006, 6:48 AM

Post #7 of 9 (7576 views)
Permalink
Re: Calling $Response->Write [In reply to]

Hey thanks,

We are getting there .... THANKS A LOT ...

But i am facing an error .... Guess you can guide me ...!!

Well here is the input file .... !!

######### [ INPUT ] #########
# input.pl

use Apache::ASP;
use CGI;
my $r = new CGI;
my $asp = Apache::ASP->new($r);
my $Response = $asp->{Response};
$Response->Write("Hello, World!");

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

$perl input.pl

############## [ ERROR ] ##########
Undefined subroutine CGI::filename
at /usr/share/perl5/Apache/ASP.pm line 260
at /usr/share/perl/5.8/CGI.pm line 818
CGI::_compile called at /usr/share/perl/5.8/CGI.pm line 782
CGI::AUTOLOAD('CGI=HASH(0x8151c28)') called at
/usr/share/perl5/Apache/ASP.pm line 260
Apache::ASP::new('Apache::ASP', 'CGI=HASH(0x8151c28)') called at
ASP.pl line 4
#################

Thanks a lot .... i tried to use perl5.8.8 also ... but in vain..!!

Thanks again....we are almost there ... !!

Regards,
Savio
--
View this message in context: http://www.nabble.com/Calling-%24Response-%3EWrite-from-perl-t1410025.html#a3842147
Sent from the Apache - Asp forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


john.drago at data393

Apr 10, 2006, 7:34 AM

Post #8 of 9 (7559 views)
Permalink
RE: Calling $Response->Write [In reply to]

I recommend you take a look at the program named "asp-perl" that is part
of the Apache::ASP distribution, as well as looking at the "Standalone
CGI Mode, without mod_perl" documentation at
http://www.apache-asp.org/cgi.html

Keep in mind you're using Apache::ASP in a setting it wasn't designed
for, so you will have to expect unexpected results.




> -----Original Message-----
> From: savimonty [mailto:savimonty [at] donboscoit]
> Sent: Monday, April 10, 2006 7:49 AM
> To: asp [at] perl
> Subject: Re: Calling $Response->Write
>
>
> Hey thanks,
>
> We are getting there .... THANKS A LOT ...
>
> But i am facing an error .... Guess you can guide me ...!!
>
> Well here is the input file .... !!
>
> ######### [ INPUT ] #########
> # input.pl
>
> use Apache::ASP;
> use CGI;
> my $r = new CGI;
> my $asp = Apache::ASP->new($r);
> my $Response = $asp->{Response};
> $Response->Write("Hello, World!");
>
> #########################
>
> $perl input.pl
>
> ############## [ ERROR ] ##########
> Undefined subroutine CGI::filename
> at /usr/share/perl5/Apache/ASP.pm line 260
> at /usr/share/perl/5.8/CGI.pm line 818
> CGI::_compile called at /usr/share/perl/5.8/CGI.pm line 782
> CGI::AUTOLOAD('CGI=HASH(0x8151c28)') called at
> /usr/share/perl5/Apache/ASP.pm line 260
> Apache::ASP::new('Apache::ASP', 'CGI=HASH(0x8151c28)') called
at
> ASP.pl line 4
> #################
>
> Thanks a lot .... i tried to use perl5.8.8 also ... but in vain..!!
>
> Thanks again....we are almost there ... !!
>
> Regards,
> Savio
> --
> View this message in context:
http://www.nabble.com/Calling-%24Response-
> %3EWrite-from-perl-t1410025.html#a3842147
> Sent from the Apache - Asp forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: asp-unsubscribe [at] perl
> For additional commands, e-mail: asp-help [at] perl
>


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


savimonty at donboscoit

Apr 14, 2006, 4:07 AM

Post #9 of 9 (7551 views)
Permalink
Re: Calling $Response->Write from perl [In reply to]

Joshua Chamas wrote ...

>If you want more fine grain control, you can look into how it executes,
>and the core of this is:
>
>$r = Apache::ASP::CGI->init($file, @script_args);
>$0 = $file; # might need real $0 in $Config
>eval $Config;
>$@ && die("can't eval config error: $@");
>$r->dir_config->set('NoState', 0) if $opt_s;
>...
>&Apache::ASP::handler($r);

Where am I to place this snippet...?

Well, I need to clarify this further ... I agree that I have to fake ... but
I do not want to execute asp files here!
I want to simply use the asp-perl objects as a simple perl code.

I hope I am making this clearer ...
Thanks.

Regards,
Savio
--
View this message in context: http://www.nabble.com/Calling-%24Response-%3EWrite-from-perl-t1410025.html#a3915167
Sent from the Apache - Asp forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl

ModPerl asp RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.