Skip to content

Commit

Permalink
Item740: add copyright and license notes
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/ModPerlEngineContrib@1937 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GilmarSantosJr authored and GilmarSantosJr committed Jan 12, 2009
1 parent 9fbd9ed commit 959381d
Show file tree
Hide file tree
Showing 6 changed files with 182 additions and 18 deletions.
18 changes: 12 additions & 6 deletions ModPerlEngineContrib/lib/Foswiki/Contrib/ModPerlEngineContrib.pm
@@ -1,15 +1,21 @@
# Contrib for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
# mod_perl Runtime Engine of Foswiki - The Free and Open Source Wiki,
# http://foswiki.org/
#
# Copyright (C) 2009 Gilmar Santos Jr, jgasjr@gmail.com and Foswiki
# contributors. Foswiki contributors are listed in the AUTHORS file in the root
# of Foswiki distribution.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# of the License, or (at your option) any later version. For
# more details read LICENSE in the root of this distribution.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details, published at
# http://www.gnu.org/copyleft/gpl.html
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# As per the GPL, removal of this notice is prohibited.

package Foswiki::Contrib::ModPerlEngineContrib;

Expand All @@ -19,6 +25,6 @@ use vars qw( $VERSION $RELEASE $SHORTDESCRIPTION );

$VERSION = '$Rev$';
$RELEASE = '0.9.0';
$SHORTDESCRIPTION = 'Permits Foswiki to be run under mod_perl';
$SHORTDESCRIPTION = 'Permits Foswiki to be executed under mod_perl';

1;
50 changes: 42 additions & 8 deletions ModPerlEngineContrib/lib/Foswiki/Engine/Apache.pm
@@ -1,3 +1,38 @@
# mod_perl Runtime Engine of Foswiki - The Free and Open Source Wiki,
# http://foswiki.org/
#
# Copyright (C) 2009 Gilmar Santos Jr, jgasjr@gmail.com and Foswiki
# contributors. Foswiki contributors are listed in the AUTHORS file in the root
# of Foswiki distribution.
#
# This module is based/inspired on Catalyst framework. Refer to
#
# http://search.cpan.org/perldoc?Catalyst
#
# for credits and liscence details.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. For
# more details read LICENSE in the root of this distribution.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# As per the GPL, removal of this notice is prohibited.

=begin TML
---+!! package Foswiki::Engine::Apache
Base class that implements mod_perl execution mode.
Refer to Foswiki::Engine documentation for explanation about methos below.
=cut

package Foswiki::Engine::Apache;

use strict;
Expand Down Expand Up @@ -46,7 +81,6 @@ use File::Spec ();
sub run {
my $this = $Foswiki::engine;
$this->{r} = shift;
$this->{query} = $this->queryClass->new( $this->{r} );
my $req = $this->prepare();

if ( UNIVERSAL::isa( $req, 'Foswiki::Request' ) ) {
Expand Down Expand Up @@ -115,13 +149,13 @@ sub preparePath {
$req->uri($uri);
}

#sub prepareBody {
# my ( $this, $req ) = @_;
# my $contentLength = $req->header('Content-Length') || 0;
# return unless $contentLength > 0;
#
# $this->{query} = $this->queryClass->new( $this->{r} );
#}
sub prepareBody {
my ( $this, $req ) = @_;
my $contentLength = $req->header('Content-Length') || 0;
return unless $contentLength > 0;

$this->{query} = $this->queryClass->new( $this->{r} );
}

sub prepareBodyParameters {
my ( $this, $req ) = @_;
Expand Down
35 changes: 35 additions & 0 deletions ModPerlEngineContrib/lib/Foswiki/Engine/Apache/MP13.pm
@@ -1,3 +1,38 @@
# mod_perl Runtime Engine of Foswiki - The Free and Open Source Wiki,
# http://foswiki.org/
#
# Copyright (C) 2009 Gilmar Santos Jr, jgasjr@gmail.com and Foswiki
# contributors. Foswiki contributors are listed in the AUTHORS file in the root
# of Foswiki distribution.
#
# This module is based/inspired on Catalyst framework. Refer to
#
# http://search.cpan.org/perldoc?Catalyst
#
# for credits and liscence details.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. For
# more details read LICENSE in the root of this distribution.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# As per the GPL, removal of this notice is prohibited.

=begin TML
---+!! package Foswiki::Engine::Apache2::MP13
Class to complement Foswiki::Engine::Apache.
Refer to Foswiki::Engine documentation for explanation about methos below.
=cut

package Foswiki::Engine::Apache::MP13;

use strict;
Expand Down
35 changes: 35 additions & 0 deletions ModPerlEngineContrib/lib/Foswiki/Engine/Apache2.pm
@@ -1,3 +1,38 @@
# mod_perl Runtime Engine of Foswiki - The Free and Open Source Wiki,
# http://foswiki.org/
#
# Copyright (C) 2009 Gilmar Santos Jr, jgasjr@gmail.com and Foswiki
# contributors. Foswiki contributors are listed in the AUTHORS file in the root
# of Foswiki distribution.
#
# This module is based/inspired on Catalyst framework. Refer to
#
# http://search.cpan.org/perldoc?Catalyst
#
# for credits and liscence details.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. For
# more details read LICENSE in the root of this distribution.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# As per the GPL, removal of this notice is prohibited.

=begin TML
---+!! package Foswiki::Engine::Apache2
Base class that implements mod_perl2 execution mode.
Refer to Foswiki::Engine documentation for explanation about methos below.
=cut

package Foswiki::Engine::Apache2;

use strict;
Expand Down
35 changes: 35 additions & 0 deletions ModPerlEngineContrib/lib/Foswiki/Engine/Apache2/MP20.pm
@@ -1,3 +1,38 @@
# mod_perl Runtime Engine of Foswiki - The Free and Open Source Wiki,
# http://foswiki.org/
#
# Copyright (C) 2009 Gilmar Santos Jr, jgasjr@gmail.com and Foswiki
# contributors. Foswiki contributors are listed in the AUTHORS file in the root
# of Foswiki distribution.
#
# This module is based/inspired on Catalyst framework. Refer to
#
# http://search.cpan.org/perldoc?Catalyst
#
# for credits and liscence details.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. For
# more details read LICENSE in the root of this distribution.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# As per the GPL, removal of this notice is prohibited.

=begin TML
---+!! package Foswiki::Engine::Apache2::MP20
Class to complement Foswiki::Engine::Apache2.
Refer to Foswiki::Engine documentation for explanation about methos below.
=cut

package Foswiki::Engine::Apache2::MP20;

use strict;
Expand Down
27 changes: 23 additions & 4 deletions ModPerlEngineContrib/tools/mod_perl_startup.pl
@@ -1,22 +1,41 @@
#!/usr/bin/perl -wT

# mod_perl Runtime Engine of Foswiki - The Free and Open Source Wiki,
# http://foswiki.org/
#
# Copyright (C) 2009 Gilmar Santos Jr, jgasjr@gmail.com and Foswiki
# contributors. Foswiki contributors are listed in the AUTHORS file in the root
# of Foswiki distribution.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. For
# more details read LICENSE in the root of this distribution.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# As per the GPL, removal of this notice is prohibited.

use strict;
use File::Spec;

BEGIN {
my ($vol, @path);
my ( $vol, @path );
foreach my $file ( keys %INC ) {
next unless $file =~ /mod_perl_startup\.pl$/;
my $dir;
($vol, $dir) = (File::Spec->splitpath($file))[0,1];
( $vol, $dir ) = ( File::Spec->splitpath($file) )[ 0, 1 ];
@path = File::Spec->splitdir($dir);
last;
}
pop @path while $path[-1] eq '';
$path[-1] = 'lib';
unshift @INC, File::Spec->catpath($vol, File::Spec->catdir(@path));
unshift @INC, File::Spec->catpath( $vol, File::Spec->catdir(@path) );
push @path, qw(CPAN lib);
unshift @INC, File::Spec->catpath($vol, File::Spec->catdir(@path));
unshift @INC, File::Spec->catpath( $vol, File::Spec->catdir(@path) );
}

use Foswiki::Engine::Apache ();
Expand Down

0 comments on commit 959381d

Please sign in to comment.