Date: Mon, 5 Apr 2004 00:45:22 +0200 (CEST) From: Lars Thegler <lars@thegler.dk> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/65176: [NEW PORT] databases/p5-Class-DBI-Loader-Relationship: Easier relationship specification in CDBI::L Message-ID: <20040404224522.A35F43EB5@dask.thegler.dk> Resent-Message-ID: <200404042250.i34MoH6Z049846@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 65176 >Category: ports >Synopsis: [NEW PORT] databases/p5-Class-DBI-Loader-Relationship: Easier relationship specification in CDBI::L >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: Sun Apr 04 15:50:17 PDT 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 acts as a mix-in, adding the relationship method to Class::DBI::Loader. Since Class::DBI::Loader knows how to map between table names and class names, there ought to be no need to replicate the names. In addition, it is common (but not universal) to want reverse relationships defined for has-many relationships, and for has-a relationships to be defined for the linkages surrounding a many-to-many table. WWW: http://search.cpan.org/dist/Class-DBI-Loader-Relationship/ Generated with FreeBSD Port Tools 0.50 >How-To-Repeat: >Fix: --- p5-Class-DBI-Loader-Relationship-1.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-Loader-Relationship # p5-Class-DBI-Loader-Relationship/Makefile # p5-Class-DBI-Loader-Relationship/distinfo # p5-Class-DBI-Loader-Relationship/pkg-descr # p5-Class-DBI-Loader-Relationship/pkg-plist # p5-Class-DBI-Loader-Relationship/files # p5-Class-DBI-Loader-Relationship/files/500503-Relationship.pm # echo c - p5-Class-DBI-Loader-Relationship mkdir -p p5-Class-DBI-Loader-Relationship > /dev/null 2>&1 echo x - p5-Class-DBI-Loader-Relationship/Makefile sed 's/^X//' >p5-Class-DBI-Loader-Relationship/Makefile << 'END-of-p5-Class-DBI-Loader-Relationship/Makefile' X# New ports collection makefile for: p5-Class-DBI-Loader-Relationship X# Date created: Apr 4 2004 X# Whom: Lars Thegler <lars@thegler.dk> X# X# $FreeBSD$ X XPORTNAME= Class-DBI-Loader-Relationship XPORTVERSION= 1.2 XCATEGORIES= databases perl5 XMASTER_SITES= ${MASTER_SITE_PERL_CPAN} XMASTER_SITE_SUBDIR= Class XPKGNAMEPREFIX= p5- X XMAINTAINER= lars@thegler.dk XCOMMENT= Easier relationship specification in CDBI::L X XBUILD_DEPENDS= ${SITE_PERL}/Class/DBI/Loader.pm:${PORTSDIR}/databases/p5-Class-DBI-Loader \ X ${SITE_PERL}/Lingua/EN/Inflect/Number.pm:${PORTSDIR}/textproc/p5-Lingua-EN-Inflect-Number XRUN_DEPENDS= ${BUILD_DEPENDS} X XPERL_CONFIGURE= yes X XMAN3= Class::DBI::Loader::Relationship.3 X X.include <bsd.port.pre.mk> X X.if ${PERL_LEVEL} < 500600 XEXTRA_PATCHES= ${PATCHDIR}/500503-Relationship.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-Loader-Relationship/Makefile echo x - p5-Class-DBI-Loader-Relationship/distinfo sed 's/^X//' >p5-Class-DBI-Loader-Relationship/distinfo << 'END-of-p5-Class-DBI-Loader-Relationship/distinfo' XMD5 (Class-DBI-Loader-Relationship-1.2.tar.gz) = d5a3262146ee4c63a46a5c87205c5619 XSIZE (Class-DBI-Loader-Relationship-1.2.tar.gz) = 3109 END-of-p5-Class-DBI-Loader-Relationship/distinfo echo x - p5-Class-DBI-Loader-Relationship/pkg-descr sed 's/^X//' >p5-Class-DBI-Loader-Relationship/pkg-descr << 'END-of-p5-Class-DBI-Loader-Relationship/pkg-descr' XThis module acts as a mix-in, adding the relationship method to XClass::DBI::Loader. Since Class::DBI::Loader knows how to map between Xtable names and class names, there ought to be no need to replicate Xthe names. In addition, it is common (but not universal) to want Xreverse relationships defined for has-many relationships, and for Xhas-a relationships to be defined for the linkages surrounding a Xmany-to-many table. X XWWW: http://search.cpan.org/dist/Class-DBI-Loader-Relationship/ END-of-p5-Class-DBI-Loader-Relationship/pkg-descr echo x - p5-Class-DBI-Loader-Relationship/pkg-plist sed 's/^X//' >p5-Class-DBI-Loader-Relationship/pkg-plist << 'END-of-p5-Class-DBI-Loader-Relationship/pkg-plist' X%%SITE_PERL%%/Class/DBI/Loader/Relationship.pm X%%SITE_PERL%%/%%PERL_ARCH%%/auto/Class/DBI/Loader/Relationship/.packlist X@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Class/DBI/Loader/Relationship X@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Class/DBI/Loader 2>/dev/null || true 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/Loader 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-Loader-Relationship/pkg-plist echo c - p5-Class-DBI-Loader-Relationship/files mkdir -p p5-Class-DBI-Loader-Relationship/files > /dev/null 2>&1 echo x - p5-Class-DBI-Loader-Relationship/files/500503-Relationship.pm sed 's/^X//' >p5-Class-DBI-Loader-Relationship/files/500503-Relationship.pm << 'END-of-p5-Class-DBI-Loader-Relationship/files/500503-Relationship.pm' X--- Relationship.pm.orig Mon Mar 1 16:48:45 2004 X+++ Relationship.pm Sun Apr 4 22:30:41 2004 X@@ -1,9 +1,8 @@ X package Class::DBI::Loader::Relationship; X-use 5.006; X use strict; X-use warnings; X-our $VERSION = '1.2'; X-our $DEBUG = 0; X+use vars qw($VERSION $DEBUG); X+$VERSION = '1.2'; X+$DEBUG = 0; X X 1; X X@@ -82,7 +81,7 @@ X "$via_c->has_a(".to_S($to)." => $to_c)\n". X "$from_c->$method($mapper => [ $via_c => ".to_S($to)." ])\n". X "$to_c->has_many(".to_PL($from)." => [ $via_c => ".to_S($from)." ])\n" X- if $DEBUG; X+ if $Class::DBI::Loader::Relationship::DEBUG; X X $via_c->has_a(to_S($from) => $from_c); X $via_c->has_a(to_S($to) => $to_c); X@@ -92,7 +91,7 @@ X } X return "$from_c->$method($mapper => $to_c);\n". X ($method ne "has_a" && "$to_c->has_a(".to_S($from)." => $from_c);\n") X- if $DEBUG; X+ if $Class::DBI::Loader::Relationship::DEBUG; X $from_c->$method($mapper => $to_c); X $to_c->has_a(to_S($from) => $from_c) unless $method eq "has_a"; X } END-of-p5-Class-DBI-Loader-Relationship/files/500503-Relationship.pm exit --- p5-Class-DBI-Loader-Relationship-1.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?20040404224522.A35F43EB5>