package mason;
use strict;
=pod

This is a sample package that shows how to use Mason in XCGI scripts 
running under Stunnix Perl Web Server.

It is very generic code so it seems it can be simply copied and reused for
all cases when Mason is used in XCGIs running under Stunnix Perl Web Server.

=cut


use HTML::Mason::CGIHandler;

#the path used as data_dir by Mason
my $md = "$ENV{STUNNIXWS_TMPSTATEDIR}mason-data";
mkdir $md;

my $h = HTML::Mason::CGIHandler->new
	(
	data_dir => $md,
	comp_root => "$ENV{'SERVER_ROOT'}../www/apps/mason-components/",
        allow_globals => [qw(%session $u)] #not SPWS-specific part.
	);

sub doit
{
    $h->handle_request();
};

1;
