Filewatcher File Search File Search
Content Search
» » » » »


Safe wrapper to DBI interface

The purpose of this module is to give controlled, limited access to an application, rather than simply passing it a raw database handle through DBI. DBIx::Safe acts as a wrapper to the database, by only allowing through the commands you tell it to. It filters all things related to the database handle - methods and attributes.

The typical usage is for your application to create a database handle via a normal DBI call to new(), then pass that to DBIx::Safe->new(), which will return you a DBIx::Safe object. After specifying exactly what is and what is not allowed, you can pass the object to the untrusted application. The object will act very similar to a DBI database handle, and in most cases can be used interchangeably.

By default, nothing is allowed to run at all. There are many things you can control. You can specify which SQL commands are allowed, by indicating the first word in the SQL statement (e.g. 'SELECT'). You can specify which database methods are allowed to run (e.g. 'ping'). You can specify a regular expression that allows matching SQL statements to run (e.g. 'qr{SET TIMEZONE}'). You can specify a regular expression that is NOT allowed to run (e.g. qr(UPDATE xxx}). Finally, you can indicate which database attributes are allowed to be read and changed (e.g. 'PrintError'). For all of the above, there are matching methods to remove them as well.

Package version:1.2.5-1


DBIx::Safe - safer access to databases via DBI


This is version 1.2.5 of DBIx::Safe


	Copyright (c) 2007 Greg Sabino Mullane <>

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.3 or,
at your option, any later version of Perl 5 you may have availab


Safe(3pm)        User Contributed Perl Documentation       Safe(3pm)

       DBIx::Safe - Safer access to your database through a DBI
       database handle

       This documents version 1.2.5 of the DBIx::Safe module

         use DBIx::Safe;

         $dbh = DBI->connect($dbn, $user, $pass, {AutoCommit => 0});

         my $safedbh = DBIx::Safe->new({ dbh => $dbh });



libdbix-safe-perl (1.2.5-1) unstable; urgency=low

  * Initial Release. (Closes: #528719)

 -- Krzysztof Krzyzaniak (eloy) <>  Sat, 19 Sep 2009 23:56:10 +0200


Revision history for DBIx::Safe

    Break test into three files, handle no db connection mor


Possible future ideas for DBIx::Safe:

* Support for prepare_cached
* Support for errstr
* Better t



Browse inside libdbix-safe-perl_1.2.5-1_all.deb

         [DIR]DEBIAN/ (2)  65535+ mirrors
         [DIR]usr/ (1)  65535+ mirrors

Download libdbix-safe-perl_1.2.5-1_all.deb

Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017