Plugin/OpenOffice.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 30 CC 2 SCAR 12.0
CC
2
Cov
0%
handler
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.3
1 # $Id: OpenOffice.pm,v 1.6 2003/01/31 11:52:33 matt Exp $
2  
3 package Apache::AxKit::Plugin::OpenOffice;
4  
5 use strict;
6 use Apache::Constants qw(OK);
7 use Apache::AxKit::Provider::OpenOffice;
8  
9 use vars qw($VERSION);
10  
11 $VERSION = '1.02';
12  
13 sub handler {
14 my $r = shift;
15  
16 if ($r->filename =~ /\.sxw$/i) {
17 my $cgi = Apache::Request->instance($r);
18 my $uri = $r->uri;
19 $cgi->parms->set('oo.request.uri' => $uri );
20 $uri =~ s(^.*/)();
21 $cgi->parms->set('oo.sxwfile' => $uri );
22  
23 # my $path_info = $r->path_info;
24 # $path_info =~ s|^/||;
25 # if (my $file = $path_info) {
26 # $r->dir_config->set("oo_file", $file);
27 # $r->notes('axkit_cache_extra', $r->notes('axkit_cache_extra') . ";oo_file=$file");
28 # }
29 # $r->dir_config->set("AxContentProvider", "Apache::AxKit::Provider::OpenOffice");
30 }
31 return OK;
32 }
33  
34 1;
35 __END__