Apache-MIMEMapper

 view release on metacpan or  search on metacpan

MIMEMapper.pm  view on Meta::CPAN

  }

  # Otherwise, let mod_mime handle things.
  return DECLINED;
}

sub AddHandler ($$@;@) {

  my ($cfg, $parms, $handler, $type) = @_;

  # Intercept the directive if the handler looks like a PerlHandler.
  # This is not an ideal check, but sufficient for the moment.
  if ($handler =~ m/::/) {
    push @{$cfg->{$type}}, $handler;
    return OK;
  }

  # Otherwise let mod_mime handle it.
  return DECLINE_CMD;
}

MIMEMapper.pm  view on Meta::CPAN

In this example, .html files are scheduled for processing with
Apache::SSI.  Additionally, .pl files outside of /perl-bin are
handled by Apache::RegistryFilter and Apache::SSI (in that order).

Because the SetHandler directive supercedes all other mod_mime
directives, all files inside of /perl-bin are processed using 
Apache::Registry.

=head1 NOTES

The current logic checks AddHandler for something that looks like
a Perl module, so

AddHandler server-parsed .shtml

still works.  The criterion for deciding if Apache::MIMEMapper
intercepts the request is whether the handler is in the form
Foo::Bar - it checks for '::'.  This is not ideal, but simple
and sufficient for most cases.

=head1 FEATURES/BUGS

README  view on Meta::CPAN

In this example, .html files are scheduled for processing with
Apache::SSI.  Additionally, .pl files outside of /perl-bin are
handled by Apache::RegistryFilter and Apache::SSI (in that order).

Because the SetHandler directive supercedes all other mod_mime
directives, all files inside of /perl-bin are processed using 
Apache::Registry.

NOTES

The current logic checks AddHandler for something that looks like
a Perl module, so

AddHandler server-parsed .shtml

still works.  The criterion for deciding if Apache::MIMEMapper
intercepts the request is whether the handler is in the form
Foo::Bar - it checks for '::'.  This is not ideal, but simple
and sufficient for most cases.

FEATURES/BUGS



( run in 0.360 second using v1.01-cache-2.11-cpan-64827b87656 )