BSD Ports

databases/p5-Mojo-SQL 0.02 FreeBSD

Safely generate and compose SQL statements

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
License
MIT
Categories
databases, perl5
Package size
9.2 KiB, 14.7 KiB installed

Description

Mojo::SQL safely generates and composes SQL statements. To prevent SQL injection attacks, every ? in the input becomes a placeholder in the generated query, with the corresponding value bound to it. Partial statements can be composed recursively to build more complex queries.

Literal question marks can be escaped with ??.

Make partial statements optional to dynamically generate WHERE clauses.

If you need a little more control over the generated SQL query, you can also bypass safety features with "sql_unsafe". But make sure to handle unsafe values yourself with appropriate escaping functions for your database. For PostgreSQL there are "escape_literal" and "escape_identifier" functions included with this module.

For databases that do not support numbered placeholders like $1 and $2, you can set a custom character with the placeholder option.

Install

Binary package:

pkg install p5-Mojo-SQL

From the ports tree:

cd /usr/ports/databases/p5-Mojo-SQL/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	p5-Mojo-SQL>0:databases/p5-Mojo-SQL

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest0.020.02--0.02
FreeBSD:14:quarterly0.020.02n/a-0.02
FreeBSD:15:latest0.020.02n/a--
FreeBSD:15:quarterly0.020.02n/an/an/a
FreeBSD:16:latest0.020.02n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Build 1

Runtime 1

The full lists below include those, and their dependencies in turn.

Build dependencies 10
Run dependencies 10
Required by 1

Configuration

No options to configure.

USES
perl5
Service scripts
none

Files

pkg-plist 4
  • %%SITE_PERL%%/Mojo/SQL.pm
  • %%SITE_PERL%%/Mojo/SQL/Statement.pm
  • %%PERL5_MAN3%%/Mojo::SQL.3.gz
  • %%PERL5_MAN3%%/Mojo::SQL::Statement.3.gz
distinfo 1
FileSizeSHA256
Mojo-SQL-0.02.tar.gz737817a5312f0731ff8866f24415020a52e6763ebad84088ec906c0d62147ef3ae00
Master sites 1
  • CPAN

Commit history 0

No commits in the history this site was built from.