Re: [Fwd: Help with @ISA]

2001-08-06 Thread Nouguier Olivier

Hi all,

Don't we need to load the module before using it?

With:

PerlModule My::Module::Name
Location /foo
SetHandler perl-script
PerlHandler My::Module::Name
/Location
## OR  
Location /foo
SetHandler perl-script
PerlHandler +My::Module::Name
/Location
#

Stas Bekman wrote:


 I don't understand why have sent your email as an attachement... how do
 you want us to quote it?

 Anyway:

 Location /foo
 SetHandler perl-script
 PerlHandler my::foo-cookie_check()
 /Location

 s/my::foo-cookie_check/my::foo::cookie_check/ - since it's not a method,
 $r is merely passed to the handler.

 And read the eagle book about stacked handlers if that's what you want.

 _
 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://eXtropia.com/
 http://singlesheaven.com http://perl.apache.orghttp://perlmonth.com/

--
My mother always used to tell me, The early bird gets the worm.
The message seemed pretty clear to me: If you sleep late, you're
a lot less likely to be killed by a bird.
-- Elliott Downing






Re: [Fwd: Help with @ISA]

2001-08-06 Thread Stas Bekman

On Mon, 6 Aug 2001, Nouguier Olivier wrote:

 Hi all,

 Don't we need to load the module before using it?

that's right, I assumed that it was preloaded already :) thanks for this
note.

 With:
 
 PerlModule My::Module::Name
 Location /foo
 SetHandler perl-script
 PerlHandler My::Module::Name
 /Location
 ## OR  
 Location /foo
 SetHandler perl-script
 PerlHandler +My::Module::Name
 /Location
 #

 Stas Bekman wrote:


  I don't understand why have sent your email as an attachement... how do
  you want us to quote it?
 
  Anyway:
 
  Location /foo
  SetHandler perl-script
  PerlHandler my::foo-cookie_check()
  /Location
 
  s/my::foo-cookie_check/my::foo::cookie_check/ - since it's not a method,
  $r is merely passed to the handler.
 
  And read the eagle book about stacked handlers if that's what you want.
 
  _
  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://eXtropia.com/
  http://singlesheaven.com http://perl.apache.orghttp://perlmonth.com/

 --
 My mother always used to tell me, The early bird gets the worm.
 The message seemed pretty clear to me: If you sleep late, you're
 a lot less likely to be killed by a bird.
 -- Elliott Downing






_
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://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





Re: [Fwd: Help with @ISA]

2001-08-04 Thread Stas Bekman

I don't understand why have sent your email as an attachement... how do
you want us to quote it?

Anyway:

Location /foo
SetHandler perl-script
PerlHandler my::foo-cookie_check()
/Location

s/my::foo-cookie_check/my::foo::cookie_check/ - since it's not a method,
$r is merely passed to the handler.

And read the eagle book about stacked handlers if that's what you want.

_
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://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





[Fwd: Help with @ISA]

2001-08-03 Thread Rasoul Hajikhani

 


Hello there,
I have a problem and I am not sure how to explain it... So please
forgive me if I sound like a rookie, since I am that. 
I have a packge called: my::foo in which I have declared the following:

package my::foo;
@my::foo::ISA = qw( my::bar );
.
.
.
sub handler
{
my $r = shift;
.
.
# rest of the code
}

I have a method called cookie_check in my 'my::bar' package that needs
to be called before my controller or 'my::foo' takes over.

package my::bar;

sub cookie_check
{
my $self= shift;
.
.
.
# rest of the code
}
I have declared the following in my httpd.conf:
Location /foo
SetHandler perl-script
PerlHandler my::foo-cookie_check()
/Location
However, I get an error message:
Can't locate object method cookie_check() via package my::foo

Can anyone tell me what am I doing wrong?
Thanks in advance
-r