On Tue, 5 Sep 2000, Matt Sergeant wrote:
> On Tue, 5 Sep 2000, Differentiated Software Solutions Pvt. Ltd wrote:
>
> > Hi,
> >
> > We corrected R to r. Problem still remains.
> > We ran this program as a standalone perl program and even this bombs. Code
> > as follows.
> >
> > #!/usr/bin/perl
> > my $r;
> > use Apache ();
> >
> > Apache->request($r);
> >
> > $r->internal_redirect('hello.html');
> >
> > Error message : Can't locate object method "request" via package "Apache" at
> > ./test1.pl line 5.
>
> You can't run it as stand alone perl code. How would you redirect on the
> command line? The apache object is specific to mod_perl and can only be
> run in that environment. And your syntax is wrong too - you can't just
> make up code and expect it to work - follow the syntax already given to
> you by others on the list.
In fact you can. Use Apache::FakeRequest.
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://apachetoday.com http://jazzvalley.com
http://singlesheaven.com http://perlmonth.com perl.org apache.org