Sybperl, version 1.0 Sybperl is a set of user-defined subroutines letting you access a Sybase data server using Perl. Requirements: Perl ver 3.0.27 or higher (4.035 strongly suggested!). Sybase DB-Library (aka Open Client) Compiling & Installing Sybperl: Unshar somewhere convenient, and edit Makefile to reflect your system setup. The following macros/defines may need to be set: PERL_VERSION Uncomment if you're using a Perl version earlier than 4.03 UPERL/SAVESTR See the comments in the Makefile, and the BUGS file. The defaults should work. HAS_CALLBACK This enables the use of Perl subroutines as DB-Library error & message handlers. This is a new feature of Perl 4.018, but it might work with earlier versions. DBLIB42 If this Makefile macro is defined, then the newer datatypes (such as SYBREAL) will be handled correctly, and dbsafestr() will be implemented. SET_VAL If this macro is set, then attempts to set a Sybperl user-variable (such as $NO_MORE_RESULTS) will result in a fatal error. Otherwise such attempts are silently ignored. NULL_UNDEF If this macro is set, then NULL values returned from a select statement will be returned as 'undef' values. Otherwise, they are returned as the string 'NULL'. OLD_SYBPERL This is a backwards compatibility flag - mainly for myself :-). It's main impact is to silently call dblogin()/dbopen() with default arguments if you omit to do so in the script. The Makefile will not attempt to build uperl.o if it can't find it. You may also need to edit the lib/sybperl.pl file to addapt it to your environment. There are some test scripts in the t directory which you can run to see if all is well, and to get an idea of what can be done with sybperl. There are also some example scripts in the 'eg' directory. Sybperl has been tested succesfully in the following environments: Sun Sparc, SunOS 4.1.1, Sybase 4.0.1, Perl 4.010 Sun 3/80, SunOS 4.0.3, Sybase 4.0.1, Perl 4.010 Sun Sparc, SunOS 4.1, Sybase 4.2, Perl 4.010 Pyramid MIServer 2/2, OSx V5.1a, Sybase 4.0, Perl 4.010 I use sybperl daily in a production environment on a Sun 4/65 under SunOS 4.1.1, with Sybase version 4.0.1 and Perl 4.035 BUGS: Both DBlibrary and Perl define a symbol named 'savestr', resulting in the Perl version being called from DBlibrary. See the BUGS file for ways to get around this problem. Memory usage can also be a problem in certain cases. Again see the BUGS file for details. BCP functions are not available, but would probably be useful. Access to IMAGE datatypes isn't handled in &dbnextrow(). Have fun using it and let me know of any improvements, problems, whatever... Michael Peppler mpeppler@itf.ch mpeppler@bix.com ITF Management SA BIX: mpeppler 13 Rue de la Fontaine Phone: (+4122) 312 1311 CH-1204 Geneva, Switzerland Fax: (+4122) 312 1322 NOTICE - Warranty and Copyright Sybperl is not a product of ITF Management. There is no warranty, and no official support. Sybperl is copyright, but may be freely distributed under the same terms as Perl itself. My thanks to the following people for testing Perl, and suggesting improvements: Teemu Torma Brent Milnor Matthew Merzbacher Eric Fifer Dan Banay Mark Lawrence Jeffrey Wong Wolfgang Richter Anders Ardo Gijs Mos Minh Ton Ha G. Roderick Singleton Peter Gutmann
You need the Perl distribution (obviously :-) to make this package. I used Perl v.4.036 - I was too lazy to check for newer patches. I went for the uperl.o option of changing _savestr to _psvestr (see the BUGS file about this subject). Note: Make on NeXTs is fussy about stray tab characters. I had to delete some from the Makefile. In fact, I had to delete all the tabs in front of comments and after variable declarations. Fussy!! Briefly tested with the Sybase limited server, using the script in ./t. Seems to work fine. Note that you must have a server running (:-) and run /usr/sybase/scripts/SetVars before the example scripts will work. In my case, I also had to modify the "sbex.pl" script to include the password for "sa" in the dblogin() call. Assuming you have a password set for the sa in your database (I hope you do! :-O ), you will have to add in your password to run the test too. The makefile for NeXT is setup with the "standard" sybase directory tree, and deposits all the binaries and libraries for sybperl in the /usr/local directory tree. Check whether this is suitable for your system. No warranties expressed or implied. If you plan to use this for anything other than experimenting, I strongly recommend you test it thoroughly! Compiled using NextStep v.3.0 on a NeXTstation. Sorry, no fat binaries yet. -A. MacRae 30/05/93 macrae@pandora.geo.ucalgary.ca
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.