Add p5-CGI-Simple 0.075, a simple totally OO CGI interface that is

CGI.pm compliant.
This commit is contained in:
Lars Thegler 2004-11-16 20:47:41 +00:00
parent e74a020fb9
commit ae5b6477e9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=121771
10 changed files with 1385 additions and 0 deletions

View file

@ -429,6 +429,7 @@
SUBDIR += p5-CGI-Response
SUBDIR += p5-CGI-SSI
SUBDIR += p5-CGI-Session
SUBDIR += p5-CGI-Simple
SUBDIR += p5-CGI-SpeedyCGI
SUBDIR += p5-CGI-Untaint
SUBDIR += p5-CGI-Untaint-email

View file

@ -0,0 +1,29 @@
# New ports collection makefile for: p5-CGI-Simple
# Date created: 16 November 2004
# Whom: Lars Thegler <lth@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= CGI-Simple
PORTVERSION= 0.075
CATEGORIES= www perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= ../by-authors/id/J/JF/JFREEMAN
PKGNAMEPREFIX= p5-
DISTNAME= ${PORTNAME:C/CGI/Cgi/}-${PORTVERSION}
MAINTAINER= lth@FreeBSD.org
COMMENT= A simple totally OO CGI interface that is CGI.pm compliant
PERL_CONFIGURE= yes
MAN3= CGI::Simple.3 \
CGI::Simple::Cookie.3 \
CGI::Simple::Standard.3 \
CGI::Simple::Util.3
pre-configure:
@${FIND} ${WRKSRC} -name '*.orig' -delete
.include <bsd.port.mk>

View file

@ -0,0 +1,2 @@
MD5 (Cgi-Simple-0.075.tar.gz) = 510e06be6530cb8721e15042cb5160ff
SIZE (Cgi-Simple-0.075.tar.gz) = 148965

View file

@ -0,0 +1,13 @@
--- Makefile.PL.orig Wed Nov 10 22:33:32 2004
+++ Makefile.PL Wed Nov 10 22:33:38 2004
@@ -5,4 +5,10 @@
'NAME' => 'CGI::Simple',
'VERSION_FROM' => 'Simple.pm', # finds $VERSION
'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
+ 'MAN3PODS' => {
+ 'Simple.pm' => '$(INST_MAN3DIR)/CGI::Simple.$(MAN3EXT)',
+ 'Simple/Cookie.pm' => '$(INST_MAN3DIR)/CGI::Simple::Cookie.$(MAN3EXT)',
+ 'Simple/Standard.pm' => '$(INST_MAN3DIR)/CGI::Simple::Standard.$(MAN3EXT)',
+ 'Simple/Util.pm' => '$(INST_MAN3DIR)/CGI::Simple::Util.$(MAN3EXT)',
+ },
);

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,93 @@
--- Simple/Cookie.pm.orig Wed Nov 10 21:56:28 2004
+++ Simple/Cookie.pm Wed Nov 10 21:57:07 2004
@@ -142,11 +142,11 @@
__END__
-=head2 NAME
+=head1 NAME
CGI::Cookie - Interface to Netscape Cookies
-=head2 SYNOPSIS
+=head1 SYNOPSIS
use CGI::Simple::Standard qw(header);
use CGI::Simple::Cookie;
@@ -166,7 +166,7 @@
# create cookies returned from an external source
%cookies = parse CGI::Simple::Cookie($ENV{COOKIE});
-=head2 DESCRIPTION
+=head1 DESCRIPTION
CGI::Simple::Cookie is an interface to Netscape (HTTP/1.1) cookies, an
innovation that allows Web servers to store persistent information on
@@ -178,7 +178,7 @@
http://www.ics.uci.edu/pub/ietf/http/rfc2109.txt
-=head2 USING CGI::Simple::Cookie
+=head1 USING CGI::Simple::Cookie
CGI::Simple::Cookie is object oriented. Each cookie object has a name
and a value. The name is any scalar value. The value is any scalar or
@@ -228,7 +228,7 @@
=back
-=head3 Creating New Cookies
+=head2 Creating New Cookies
$c = new CGI::Simple::Cookie( -name => 'foo',
-value => 'bar',
@@ -260,7 +260,7 @@
B<-secure> if set to a true value instructs the browser to return the
cookie only when a cryptographic protocol is in use.
-=head3 Sending the Cookie to the Browser
+=head2 Sending the Cookie to the Browser
Within a CGI script you can send a cookie to the browser by creating
one or more Set-Cookie: fields in the HTTP header. Here is a typical
@@ -295,7 +295,7 @@
print "Set-Cookie: ",$c->as_string,"\n";
-=head3 Recovering Previous Cookies
+=head2 Recovering Previous Cookies
%cookies = fetch CGI::Simple::Cookie;
@@ -322,7 +322,7 @@
$COOKIES = `cat /usr/tmp/Cookie_stash`;
%cookies = parse CGI::Simple::Cookie($COOKIES);
-=head3 Manipulating Cookies
+=head2 Manipulating Cookies
Cookie objects have a series of accessor methods to get and set cookie
attributes. Each accessor has a similar syntax. Called without
@@ -365,7 +365,7 @@
=back
-=head2 AUTHOR INFORMATION
+=head1 AUTHOR INFORMATION
Original version copyright 1997-1998, Lincoln D. Stein. All rights reserved.
@@ -376,11 +376,11 @@
Address bug reports and comments to: jfreeman@tassie.net.au
-=head2 BUGS
+=head1 BUGS
This section intentionally left blank :-)
-=head2 SEE ALSO
+=head1 SEE ALSO
L<CGI::Carp>, L<CGI::Simple>

View file

@ -0,0 +1,104 @@
--- Simple/Standard.pm.orig Wed Nov 10 21:58:55 2004
+++ Simple/Standard.pm Wed Nov 10 21:59:28 2004
@@ -126,12 +126,12 @@
1;
-=head2 NAME
+=head1 NAME
CGI::Simple::Standard - a wrapper module for CGI::Simple that provides a
function style interface
-=head2 SYNOPSIS
+=head1 SYNOPSIS
use CGI::Simple::Standard qw( -autoload );
use CGI::Simple::Standard qw( :core :cookie :header :misc );
@@ -210,13 +210,13 @@
dienice( cgi_error() ) if cgi_error();
-=head2 DESCRIPTION
+=head1 DESCRIPTION
This module is a wrapper for the completely object oriented CGI::Simple
module and provides a simple functional style interface. It provides two
different methods to import function names into your namespace.
-=head3 Autoloading
+=head2 Autoloading
If you specify the '-autoload' pragma like this:
@@ -234,7 +234,7 @@
(if it exists) to it. A fatal exception will be thrown if you try to use an
undefined method (function).
-=head3 Specified Export
+=head2 Specified Export
Alternatively you can specify the functions you wish to import. You can do
this on a per function basis like this:
@@ -284,12 +284,12 @@
Note that the function groups all start with a : char.
-=head3 Mix and Match
+=head2 Mix and Match
You can use the '-autoload' pragma, specifically named function imports and
tag group imports together if you desire.
-=head2 $POST_MAX and $DISABLE_UPLOADS
+=head1 $POST_MAX and $DISABLE_UPLOADS
If you wish to set $POST_MAX or $DISABLE_UPLOADS you must do this *after* the
use statement and *before* the first function call as shown in the synopsis.
@@ -307,7 +307,7 @@
use CGI::Simple::Standard qw( -default ..... );
-=head2 EXPORT
+=head1 EXPORT
Nothing by default.
@@ -321,7 +321,7 @@
stub functions will be replaced with the real functions only if you actually
call them saving wasted compilation effort.
-=head2 FUNCTION DETAILS
+=head1 FUNCTION DETAILS
This is a wrapper module for CGI::Simple. Virtually all the methods available
in the OO interface are available via the functional interface. Several
@@ -349,11 +349,11 @@
For full details of the available functions see the CGI::Simple docs. Just
remove the $q-> part and use the method name directly.
-=head2 BUGS
+=head1 BUGS
As this is 0.01 there are almost bound to be some.
-=head2 AUTHOR
+=head1 AUTHOR
Dr James Freeman E<lt>jfreeman@tassie.net.auE<gt>
@@ -361,12 +361,12 @@
implied warranty. It may be used, redistributed and/or modified under the terms
of the Perl Artistic License (see http://www.perl.com/perl/misc/Artistic.html)
-=head2 CREDITS
+=head1 CREDITS
The interface and key sections of the CGI::Simple code come from
CGI.pm by Lincoln Stein.
-=head2 SEE ALSO
+=head1 SEE ALSO
L<CGI::Simple which is the back end for this module>,
B<CGI.pm by Lincoln Stein>

View file

@ -0,0 +1,42 @@
--- Simple/Util.pm.orig Wed Nov 10 21:57:52 2004
+++ Simple/Util.pm Wed Nov 10 21:58:15 2004
@@ -338,18 +338,18 @@
__END__
-=head2 NAME
+=head1 NAME
CGI::Util - Internal utilities used by CGI::Simple module
-=head2 SYNOPSIS
+=head1 SYNOPSIS
$escaped = escapeHTML('In HTML you need to escape < > " and & chars');
$unescaped = unescapeHTML('&lt;&gt;&quot;&amp;');
$url_encoded = escape($string);
$decoded = unescape($url_encoded);
-=head2 DESCRIPTION
+=head1 DESCRIPTION
CGI::Simple::Util contains essentially non public subroutines used by
CGI::Simple. There are HTML and URL escape and unescape routines that may
@@ -358,7 +358,7 @@
An internal object is used to store a number of system specific details to
enable the escape routines to be accurate.
-=head2 AUTHOR INFORMATION
+=head1 AUTHOR INFORMATION
Original version copyright 1995-1998, Lincoln D. Stein. All rights reserved.
@@ -369,7 +369,7 @@
Address bug reports and comments to: jfreeman@tassie.net.au
-=head2 SEE ALSO
+=head1 SEE ALSO
L<CGI::Simple>

View file

@ -0,0 +1,7 @@
CGI::Simple provides a relatively lightweight drop in replacement
for CGI.pm. It shares an identical OO interface to CGI.pm for
parameter parsing, file upload, cookie handling and header generation.
This module is entirely object oriented, however a complete functional
interface is available by using the CGI::Simple::Standard module.
WWW: http://search.cpan.org/dist/Cgi-Simple

View file

@ -0,0 +1,9 @@
%%SITE_PERL%%/CGI/Simple.pm
%%SITE_PERL%%/CGI/Simple/Cookie.pm
%%SITE_PERL%%/CGI/Simple/Standard.pm
%%SITE_PERL%%/CGI/Simple/Util.pm
%%SITE_PERL%%/%%PERL_ARCH%%/auto/CGI/Simple/.packlist
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/CGI/Simple
@unexec rmdir %D/%%SITE_PERL%%/auto/CGI 2>/dev/null || true
@dirrm %%SITE_PERL%%/CGI/Simple
@unexec rmdir %D/%%SITE_PERL%%/CGI 2>/dev/null || true