Skip site navigation (1)Skip section navigation (2)
Date:      Sun,  4 Apr 2004 01:52:56 +0200 (CEST)
From:      Lars Thegler <lars@thegler.dk>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/65149: [NEW PORT] databases/p5-Class-DBI-AsForm: Produce HTML form elements for database columns
Message-ID:  <20040403235256.890D93EB4@dask.thegler.dk>
Resent-Message-ID: <200404040000.i3400WBi072800@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         65149
>Category:       ports
>Synopsis:       [NEW PORT] databases/p5-Class-DBI-AsForm: Produce HTML form elements for database columns
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 03 16:00:32 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Lars Thegler
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
>Environment:
System: FreeBSD dask.thegler.dk 4.9-STABLE FreeBSD 4.9-STABLE #2: Wed Nov  5 11:25:36 CET
>Description:
This module helps to generate HTML forms for creating new database
rows or editing existing rows. It maps column names in a database
table to HTML form elements which fit the schema. Large text fields
are turned into textareas, and fields with a has-a relationship to
other Class::DBI tables are turned into select drop-downs populated
with objects from the joined class.

WWW: http://search.cpan.org/dist/Class-DBI-AsForm/

Note to committer: This port depends on p5-Class-DBI-Plugin-Type,
which was just submitted.

Generated with FreeBSD Port Tools 0.50
>How-To-Repeat:
>Fix:

--- p5-Class-DBI-AsForm-2.2.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	p5-Class-DBI-AsForm
#	p5-Class-DBI-AsForm/Makefile
#	p5-Class-DBI-AsForm/distinfo
#	p5-Class-DBI-AsForm/pkg-descr
#	p5-Class-DBI-AsForm/pkg-plist
#	p5-Class-DBI-AsForm/files
#	p5-Class-DBI-AsForm/files/500503-AsForm.pm
#
echo c - p5-Class-DBI-AsForm
mkdir -p p5-Class-DBI-AsForm > /dev/null 2>&1
echo x - p5-Class-DBI-AsForm/Makefile
sed 's/^X//' >p5-Class-DBI-AsForm/Makefile << 'END-of-p5-Class-DBI-AsForm/Makefile'
X# New ports collection makefile for:	p5-Class-DBI-AsForm
X# Date created:				Apr 3 2004
X# Whom:					Lars Thegler <lars@thegler.dk>
X#
X# $FreeBSD$
X
XPORTNAME=	Class-DBI-AsForm
XPORTVERSION=	2.2
XCATEGORIES=	databases perl5
XMASTER_SITES=	${MASTER_SITE_PERL_CPAN}
XMASTER_SITE_SUBDIR=	Class
XPKGNAMEPREFIX=	p5-
X
XMAINTAINER=	lars@thegler.dk
XCOMMENT=	Produce HTML form elements for database columns
X
XBUILD_DEPENDS=	${SITE_PERL}/Class/DBI.pm:${PORTSDIR}/databases/p5-Class-DBI \
X		${SITE_PERL}/HTML/Element.pm:${PORTSDIR}/www/p5-HTML-Tree \
X		${SITE_PERL}/Class/DBI/Plugin/Type.pm:${PORTSDIR}/database/p5-Class-DBI-Plugin-Type
XRUN_DEPENDS=	${BUILD_DEPENDS}
X
XPERL_CONFIGURE=	yes
X
XMAN3=		Class::DBI::AsForm.3
X
X.include <bsd.port.pre.mk>
X
X.if ${PERL_LEVEL} < 500600
XEXTRA_PATCHES=	${PATCHDIR}/500503-AsForm.pm
X
Xpost-configure:
X	${PERL} -pi -e 's,/usr/local/,\$$(PREFIX)/,g' ${WRKSRC}/Makefile
X.endif
X
X.include <bsd.port.post.mk>
END-of-p5-Class-DBI-AsForm/Makefile
echo x - p5-Class-DBI-AsForm/distinfo
sed 's/^X//' >p5-Class-DBI-AsForm/distinfo << 'END-of-p5-Class-DBI-AsForm/distinfo'
XMD5 (Class-DBI-AsForm-2.2.tar.gz) = 09a3824bfbf260f2b12583828dce5068
XSIZE (Class-DBI-AsForm-2.2.tar.gz) = 3558
END-of-p5-Class-DBI-AsForm/distinfo
echo x - p5-Class-DBI-AsForm/pkg-descr
sed 's/^X//' >p5-Class-DBI-AsForm/pkg-descr << 'END-of-p5-Class-DBI-AsForm/pkg-descr'
XThis module helps to generate HTML forms for creating new database
Xrows or editing existing rows. It maps column names in a database
Xtable to HTML form elements which fit the schema. Large text fields
Xare turned into textareas, and fields with a has-a relationship to
Xother Class::DBI tables are turned into select drop-downs populated
Xwith objects from the joined class.
X
XWWW: http://search.cpan.org/dist/Class-DBI-AsForm/
END-of-p5-Class-DBI-AsForm/pkg-descr
echo x - p5-Class-DBI-AsForm/pkg-plist
sed 's/^X//' >p5-Class-DBI-AsForm/pkg-plist << 'END-of-p5-Class-DBI-AsForm/pkg-plist'
X%%SITE_PERL%%/Class/DBI/AsForm.pm
X%%SITE_PERL%%/%%PERL_ARCH%%/auto/Class/DBI/AsForm/.packlist
X@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Class/DBI/AsForm
X@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Class/DBI 2>/dev/null || true
X@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Class 2>/dev/null || true
X@unexec rmdir %D/%%SITE_PERL%%/Class/DBI 2>/dev/null || true
X@unexec rmdir %D/%%SITE_PERL%%/Class 2>/dev/null || true
END-of-p5-Class-DBI-AsForm/pkg-plist
echo c - p5-Class-DBI-AsForm/files
mkdir -p p5-Class-DBI-AsForm/files > /dev/null 2>&1
echo x - p5-Class-DBI-AsForm/files/500503-AsForm.pm
sed 's/^X//' >p5-Class-DBI-AsForm/files/500503-AsForm.pm << 'END-of-p5-Class-DBI-AsForm/files/500503-AsForm.pm'
X--- AsForm.pm.orig	Sat Apr  3 22:37:32 2004
X+++ AsForm.pm	Sat Apr  3 22:37:38 2004
X@@ -1,16 +1,14 @@
X package Class::DBI::AsForm;
X-use 5.006;
X use strict;
X-use warnings;
X use Class::DBI::Plugin::Type ();
X-our $OLD_STYLE = 0;
X+use vars qw($OLD_STYLE);$OLD_STYLE = 0;
X 
X use HTML::Element;
X require Exporter;
X-our @ISA = qw(Exporter);
X-our @EXPORT = qw( to_cgi to_field _to_textarea _to_textfield _to_select
X+use vars qw(@ISA);@ISA = qw(Exporter);
X+use vars qw(@EXPORT);@EXPORT = qw( to_cgi to_field _to_textarea _to_textfield _to_select
X type_of );
X-our $VERSION = '2.2';
X+use vars qw($VERSION);$VERSION = '2.2';
X 
X =head1 NAME
X 
X@@ -100,14 +98,14 @@
X sub _to_textarea {
X     my ($self, $col) = @_;
X     my $a = HTML::Element->new("textarea", name => $col);
X-    if (ref $self) { $a->push_content($self->$col) }
X+    if (ref $self) { $a->push_content($self->$col()) }
X     $OLD_STYLE && return $a->as_HTML;
X     $a;
X }
X 
X sub _to_textfield {
X     my ($self, $col) = @_;
X-    my $value = ref $self && $self->$col;
X+    my $value = ref $self && $self->$col();
X     my $a = HTML::Element->new("input", type=> "text", name => $col);
X     $a->attr("value" => $value) if $value;
X     $OLD_STYLE && return $a->as_HTML;
X@@ -122,7 +120,7 @@
X     for (@objs) { 
X         my $sel = HTML::Element->new("option", value => $_->id);
X         $sel->attr("selected" => "selected") if ref $self 
X-                                                and eval { $_->id == $self->$col->id };
X+                                                and eval { $_->id == $self->$col()->id };
X         $sel->push_content($_->stringify_self);
X         $a->push_content($sel);
X     }
END-of-p5-Class-DBI-AsForm/files/500503-AsForm.pm
exit
--- p5-Class-DBI-AsForm-2.2.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040403235256.890D93EB4>