| 1 | 1 | $VERSION = "1.06"; | |||||||||||
| 2 | package DBIx::Frame; | ||||||||||||
| 3 | 1 | our $VERSION = "1.06"; | |||||||||||
| 4 | |||||||||||||
| 5 | # -*- Perl -*- Wed May 26 09:23:06 CDT 2004 | ||||||||||||
| 6 | ############################################################################### | ||||||||||||
| 7 | # Written by Tim Skirvin <tskirvin@ks.uiuc.edu> | ||||||||||||
| 8 | # Copyright 2000-2004, Tim Skirvin and UIUC Board of Trustees. | ||||||||||||
| 9 | # Redistribution terms are below. | ||||||||||||
| 10 | ############################################################################### | ||||||||||||
| 11 | |||||||||||||
| 12 | =head1 NAME | ||||||||||||
| 13 | |||||||||||||
| 14 | DBIx::Frame - a perl module for creating and maintaining DBI frameworks | ||||||||||||
| 15 | |||||||||||||
| 16 | =head1 SYNOPSIS | ||||||||||||
| 17 | |||||||||||||
| 18 | use DBIx::Frame; | ||||||||||||
| 19 | DBIx::Frame->init('server', 'dbtype') || exit(0); | ||||||||||||
| 20 | my $DB = DBIx::Frame->new('database', 'user', 'pass') | ||||||||||||
| 21 | or die("Couldn't connect to database: ", DBI->errstr); | ||||||||||||
| 22 | |||||||||||||
| 23 | See below for how to actually use this object. | ||||||||||||
| 24 | |||||||||||||
| 25 | =head1 DESCRIPTION | ||||||||||||
| 26 | |||||||||||||
| 27 | DBIx::Frame is an extension of the standard DBI perl module, designed | ||||||||||||
| 28 | around mysql, and used to create and maintain frameworks for databases. | ||||||||||||
| 29 | It has query logging, and a standardized interface for standard SQL | ||||||||||||
| 30 | statements like 'update' and 'insert' that doesn't require understanding | ||||||||||||
| 31 | SQL to any great degree. Ideally, the user or developer shouldn't have to | ||||||||||||
| 32 | know too much SQL to be able to administer a database. On the other hand, | ||||||||||||
| 33 | it does require a certain setup that isn't necessarily easy to pick up, | ||||||||||||
| 34 | and isn't standard SQL - with all the problems that this entails. | ||||||||||||
| 35 | |||||||||||||
| 36 | Database design is discussed below. | ||||||||||||
| 37 | |||||||||||||
| 38 | =cut | ||||||||||||
| 39 | |||||||||||||
| 40 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 41 | 1 | ▶ | use DBI; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 42 | 1 | ▶ | use SelfLoader; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 43 | 1 | require Exporter; | |||||||||||
| 44 | |||||||||||||
| 45 | 1 | ▶ | use vars qw( $SERVER $DBTYPE $USER $PASS $DBNAME %FIELDS %KEYS %LIST %HTML | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 46 | 1 | %REQUIRED %ADMIN %TEXT %ORDER $DEBUG $ERROR ); | |||||||||||
| 47 | 1 | ▶ | $DEBUG ||= 0; # Default of $DEBUG is 0 - must set it elsewhere | ||||||||||
|
Condition50%1/2
$DBIx::Frame::DEBUG ||= 0
MC/DC0%0/1
$DBIx::Frame::DEBUG ||= 0
$DBIx::Frame::DEBUG
Truth table50%1/2
A
A= $DBIx::Frame::DEBUG
| |||||||||||||
| 48 | |||||||||||||
| 49 | 1 | SelfLoader->load_stubs(); # Prepare module so it can be loaded elsewhere | |||||||||||
| 50 | |||||||||||||
| 51 | 1 | 1; | |||||||||||
| 52 | |||||||||||||
| 53 | __DATA__ # Comment me out to test the functions without SelfLoader; | ||||||||||||