Butler-MacPerl picture Perl Butler Module Home Page

by Peter Chen 2/26/96

Last updated $Date: 1998/12/31 04:07:47 $ UTC.

Download Butler Module 0.2, Butlerpm.sit.hqx 47K


What's Butler Module?
What's in the package?
How do I install this?
How do I use this?
Bugs and caveats
Disclaimer/Legalism
Credit

What's Butler Module?

Butler module is a Perl module that enables perl scripts to access the Butler SQL database. Currently, this only works on Macs. So this will only be useful with MacPerl.

What's in the package?

  Butler.ph    - Butler module perl header file with useful constants defined
  Butler.pm    - Butler module, package name "Butler".
  Butler.XFCN  - Everyware's DAM Externals
  README       - this file
  testpl.pl    - simple example testing whether Butler.pm is 'require'
	             friendly
  testpm.pl    - simple example testing whether Butler.pm is 'use'
	             friendly

How do I install this?

Simply put Butler.ph, Butler.pm, and Butler.XFCN in a folder/directory that's in your perl library path. I recommend adding a "local lib" into your MacPerl library path, and put the files in the "local lib" folder instead. This makes it easier to differentiate them from the files distributed with the standard library.

How do I use this?

Butler.pm provides you with the following functions, if you "use Butler',
  btlr_login       btlr_fetch      btlr_version
  btlr_connect     btlr_rollback   btlr_clnt_errno
  btlr_disconnect  btlr_commit     btlr_errno
  btlr_finish      btlr_do         btlr_errno2
  btlr_prepare	   btlr_lookup     btlr_errstr
  btlr_execute     btlr_mkdbstr    btlr_rv
If you 'require Butler.pm' instead, you will have to use '&Butler::connect', '&Butler::disconnect', etc instead. The arguments are documented in the source. The easiest way to start is use testpm.pl as a template.

Bugs and caveats

The interface is modeled after DBD/DBI specification (loosely, as Tim Bunce pointed out). A few known shortcomings:
  1. Only one statement handle per session. There is no way to prepare multiple statements in one session. For one session, there is only one active statement. So in reality, the database handle and the statement handle are equivalent. You can use them interchangeably. The session switching part has not been tested rigorously though.

Disclaimer/Legalism

Credit

MacPerl used here
If you have any comment regarding this page, you may contact me directly at
petechen@remus.rutgers.edu. For discussions regarding Butler module, I recommend sending mail to Butler-L. You are welcome to mirror this page as you see fit.

Back to the top


Peter Chen <petechen@remus.rutgers.edu>
$Id: Butlerpm.html,v 1.3 1998/12/31 04:07:47 petechen Exp $