Next:
Singleton::Memcache
Previous:
Singleton::CGI
 [Table of Contents]

Singleton::DBI



NAME

Singleton::DBI - A singleton wrapper around the DBI object.

SYNOPSIS

    #!/usr/bin/perl -w

    use Singleton::DBI;
    use strict;

    my $db = Singleton::DBI->instance();

    $db->do( "UPDATE users SET cool=1 WHERE username='steve'" );

DESCRIPTION

  This object is a Singleton wrapper around the DBI database  module.

  This allows all areas of the code to perform queries against the
 database without having to explicitly connect and disconnect themselves.

instance

  Gain access to the single instance of our database connection.

new

  Create a new instance of this object.  This is only ever called once
 since this object is used as a Singleton.

AUTHOR

Steve Kemp

http://www.steve.org.uk/

LICENSE

Copyright (c) 2005-2007 by Steve Kemp. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license.


[Top] Generated by HTML::FromPod 0.49 on Fri Nov 21 03:03:57 2008