On 6/27/05, Philip M. Gollucci <[EMAIL PROTECTED]> wrote:
> Douglas Riordan wrote:
> 
> >greetings,
> >
> >so i was trying to get a small mp2 method handler working:
> >
> >package My;
> >use strict;
> >use warnings;
> >
> >use base qw(Base);
> >use Apache2::RequestRec();
> >use Apache2::RequestIO();
> >use Apache2::Const qw(OK);
> >
> >sub handler : method {
> >  my ($self, $r) = @_;
> >
> >  $r->content_type("text/plain");
> >
> >  $r->print($self->hello_world(), "\n");
> >  # $r->print("does this seg fault?\n");
> >
> >  for (sort keys %ENV) {
> >    $r->print("$_ => $ENV{$_}\n");
> >  }
> >
> >  return OK;
> >}
> >
> >
> I belive you just want to say:
> 
> return Apache2::Const::OK;

from Apache2::Const's perldoc
use Apache2::Const qw(OK);
compiles imports the OK constant.

use Apache2::Const -compile => qw(OK);
only compiles the OK constant in which case i would have to use
return Apache2::Const::OK

doug riordan

Reply via email to