Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > b19212d1d821b5016fd913fedcadbd3c > files > 54

mason-1.420.0-1mdv2010.0.noarch.rpm

package MyApp::Mason;

# Bring in Mason with Apache support.
use HTML::Mason::ApacheHandler;
use strict;

# List of modules that you want to use within components.
{ package HTML::Mason::Commands;
  use Data::Dumper;
}

# Create ApacheHandler object at startup.
my $ah = new HTML::Mason::ApacheHandler( comp_root => '<component root>',
                                         data_dir => '<data directory>' );

sub handler
{
    my ($r) = @_;

    my $status = $ah->handle_request($r);
    return $status;
}

1;


__END__

In your httpd.conf, add something like this:

 PerlRequire MyApp::Mason

 <LocationMatch "\.html$">
   SetHandler perl-script
   PerlHandler MyApp::Mason
 </LocationMatch>