MakeCapital.pm untested

filter: Statementstmt 0.0% 0 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 20 CC 1 SCAR 6.9
CC
1
Cov
0%
handler
2.0
PRINT
2.0
BEGIN
2.0
CRAP 2.0
1  
2 =head1 NAME
3  
4 Apache::MakeCapital - convert server output to uppercase
5  
6 =cut
7  
8 package Apache::MakeCapital;
9 use strict;
10 use Apache::OutputChain;
11 use vars qw( @ISA );
12 @ISA = qw( Apache::OutputChain );
13 sub handler
14 {
15 my $r = shift;
16 Apache::OutputChain::handler($r, __PACKAGE__);
17 }
18  
19 sub PRINT
20 {
21 shift->Apache::OutputChain::PRINT(uc join '', @_);
22 }
23 1;
24  
25 =head1 SYNOPSIS
26  
27 In the conf/access.conf file of your Apache installation, add lines
28 like
29  
30 <Files *.html>
31 SetHandler perl-script
32 PerlHandler Apache::OutputChain Apache::MakeCapital Apache::PassHtml
33 </Files>
34  
35 =head1 DESCRIPTION
36  
37 This is a module to show the use of module B<Apache::OutputChain>.
38 The function I<handler> simply inserts this module into the chain,
39 calling
40  
41 Apache::OutputChain::handler($r, __PACKAGE__);
42  
43 This is the initialization stage. The second parameter in the call to
44 I<Apache::OutputChain::handler> must be a name of this class, so that
45 B<Apache::OutputChain> will know, whom to put into the chain.
46  
47 The package also must define function I<PRINT>, that will be called in
48 the chain. In this example, it capitalized all output being sent. It
49 will mess up the links (A HREF's) so is really just for illustration ;-)
50  
51 =head1 AUTHOR
52  
53 (c) 1997--1998 Jan Pazdziora, adelton@fi.muni.cz,
54 http://www.fi.muni.cz/~adelton/ at Faculty of Informatics, Masaryk
55 University, Brno, Czech Republic
56  
57 =cut