List Info

Thread: Calling $Response->Write




Calling $Response->Write
user name
2006-04-10 09:24:23
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-unsubscribeperl.apache.org
For additional commands, e-mail: asp-helpperl.apache.org

Calling $Response->Write
user name
2006-04-10 12:17:07
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-unsubscribeperl.apache.org
For additional commands, e-mail: asp-helpperl.apache.org

Calling $Response->Write
user name
2006-04-10 12:45:41
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->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-unsubscribeperl.apache.org
>For additional commands, e-mail: asp-helpperl.apache.org
>
>
>  
>


------------------------------------------------------------
---------
To unsubscribe, e-mail: asp-unsubscribeperl.apache.org
For additional commands, e-mail: asp-helpperl.apache.org

Calling $Response->Write
user name
2006-04-10 13:48:31
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->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-unsubscribeperl.apache.org
For additional commands, e-mail: asp-helpperl.apache.org

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )