From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Apr 3 16:00:32 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A6F3616A4E0 for ; Sat, 3 Apr 2004 16:00:32 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A01343D39 for ; Sat, 3 Apr 2004 16:00:32 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i3400Wbv072801 for ; Sat, 3 Apr 2004 16:00:32 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i3400WBi072800; Sat, 3 Apr 2004 16:00:32 -0800 (PST) (envelope-from gnats) Resent-Date: Sat, 3 Apr 2004 16:00:32 -0800 (PST) Resent-Message-Id: <200404040000.i3400WBi072800@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Lars Thegler Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 060C516A4CE for ; Sat, 3 Apr 2004 15:52:58 -0800 (PST) Received: from cicero0.cybercity.dk (cicero0.cybercity.dk [212.242.40.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AF3643D5D for ; Sat, 3 Apr 2004 15:52:57 -0800 (PST) (envelope-from lth@dask.thegler.dk) Received: from dask.thegler.dk (port156.ds1-bav.adsl.cybercity.dk [217.157.188.161]) by cicero0.cybercity.dk (Postfix) with ESMTP id ABF8428CE4 for ; Sun, 4 Apr 2004 01:52:56 +0200 (CEST) Received: by dask.thegler.dk (Postfix, from userid 1001) id 890D93EB4; Sun, 4 Apr 2004 01:52:56 +0200 (CEST) Message-Id: <20040403235256.890D93EB4@dask.thegler.dk> Date: Sun, 4 Apr 2004 01:52:56 +0200 (CEST) From: Lars Thegler To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/65149: [NEW PORT] databases/p5-Class-DBI-AsForm: Produce HTML form elements for database columns X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2004 00:00:32 -0000 >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 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 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 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: