very simple module, a prereq for some catalyst controller.

This commit is contained in:
espie 2007-04-16 19:39:24 +00:00
parent 2b185486b5
commit 02b42a0b59
4 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,15 @@
# $OpenBSD: Makefile,v 1.1.1.1 2007/04/16 19:39:24 espie Exp $
COMMENT= "manipulate SQL sort strings"
MODULES= cpan
DISTNAME= Sort-SQL-0.02
CATEGORIES= databases devel www
# perl
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (Sort-SQL-0.02.tar.gz) = TTOFgmZyX0V/JbAWN/dF9g==
RMD160 (Sort-SQL-0.02.tar.gz) = yBUOTtxzU6p4JB7WNrR2QynUT0U=
SHA1 (Sort-SQL-0.02.tar.gz) = cNGYEGdtnPi4olS9kjZzeudsl8k=
SHA256 (Sort-SQL-0.02.tar.gz) = HEsT3RDLzZERQKzAd71jFgc6ZGG7Mndz+XFhBizdH0Q=
SIZE (Sort-SQL-0.02.tar.gz) = 2884

View File

@ -0,0 +1,12 @@
Sort::SQL is so simple it almost doesn't deserve to be on CPAN. But since I kept
finding myself copy/pasting this method into multiple places, I finally figured
it deserved to live in its own class.
Sort::SQL implements one method: string2array().
Takes a scalar string of the SQL C<ORDER BY> syntax and turns it into
an array of key/value pair hashrefs.
This method can be used e.g. in Template Toolkit applications, to create
re-sortable table columns.

View File

@ -0,0 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2007/04/16 19:39:24 espie Exp $
${P5SITE}/Sort/
${P5SITE}/Sort/SQL.pm
@man man/man3p/Sort::SQL.3p