The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Changes for version 0.81 - 2004-03-15

  • Overall:
    • Use Log::Log4perl to do logging/debugging. All internal SPOPS classes, and the code generated by them, has been modified to use it. Previously existing debugging methods (_w and _wm) use log4perl under the hood. A script (eg/modify_debug_to_l4p.pl) is provided for you to convert your own code to log4perl calls.
    • Modify slightly the default behavior for 'sql_quote()' as defined in SPOPS::SQLInterface. Nobody should notice...
    • A fistful of bugfixes and minor enhancements.
  • Individual:
    • SPOPS.pm:
      • Add a 'initialize_custom()' step to 'new()' to allow subclasses to do customization in the constructor. Thanks Simon!
      • Replace '_w()' and '_wm()' with calls to log4perl -- this is for backwards compatibility only; you should run eg/modify_debug_to_l4p.pl to get on the bandwagon
      • Fix bug in AUTOLOAD that didn't create the accessor/mutator + clearing method on a first invocation of '{property}_clear' when you're not using strict field checking. Thanks to Lee Revell (rlrevell@dca.net) for reporting the error and the failure case.
      • Add new configuration property 'field_raw'; this can hold the actual fields used for the object in their original case. So if your database pulls 'person_ID' as a fieldname you can use both 'person_id' and 'person_ID' as a hash key *and* as a accessor/mutator, even when using strict field checking. Thanks to Simon for pointing this out.
    • SPOPS/ClassFactory/DefaultBehavior.pm:
      • Fix a 'return' where the error message was truncated due to commas rather than period being used. Thanks to Simon for the spot.
      • On class generation: if 'field_raw' isn't defined in the class configuration set it to the original (pre-munged) list of fields.
    • SPOPS/ClassFactory/DBI.pm:
      • Fix a 'return' where the error message was truncated due to commas rather than period being used. Thanks to Simon for the spot.
    • SPOPS/DBI.pm:
      • Provide better error message from 'id_clause()' when we don't have any type information available. Thanks to Simon Ilyushchenko (simonf@cshl.edu) for the report.
      • For constructing group queries (fetch_group, fetch_iterator), add the class's table to the 'from' array if it's not already there. This allows you to specify join queries and 'assume' the class table will be added.
      • In save() only call pre_fetch_id() or post_fetch_id() if an ID is NOT ALREADY DEFINED.
      • Applied patch from Pawel Gajda to fix lazy loading problem.
    • SPOPS/DBI/([:driver:]).pm:
      • Get rid of all driver implementations of 'sql_quote()' since it's defined in SPOPS::SQLinterface and they were all using the same definition anyway.
    • SPOPS/HashFile.pm:
      • Don't dereference a hash, gets rid of warning many OI users saw since they upgraded to 5.8...
    • SPOPS/Loopback.pm:
      • Add a simple (!) ability for 'fetch_group' to parse the 'where' clause and use options from 'value' to substitute for a placeholder.
      • Fix extraneous warnings regarding 'pre_fetch_id' and 'post_fetch_id' when using strict field checking.
    • SPOPS/Manual/Configuration.pm:
      • Fix configuration typo (using 'publisher_link' instead of 'publisher_book' in links_to configuration). Thanks Simon!
    • SPOPS/Secure.pm:
      • Add warnings when our definitions of global_current_user and global_current_groups are found.
    • SPOPS/SQLInterface.pm:
      • Add to default 'sql_quote()' a check to see if the $value to be quoted is defined; if not use 'NULL'. Thanks to Simon for the report. Also, document the 'sql_quote()' method and make the new default to use the two-argument form of DBI->quote( $value, $type ).
    • SPOPS/Tie/StrictField.pm:
      • Get rid of carp calls on strict field violations, replacing them with log4perl calls. (This means you cannot set a SIG{__WARN__} handler anymore...)
    • SPOPS/Tool/DateConvert.pm:
      • When converting FROM an object TO a string (e.g., during a save()), if the given item isn't a reference then just return it, assuming it's a date in the right string format.
    • SPOPS/Tool/UTFConvert.pm:
      • Determine at runtime whether we're running in 5.6.0 or less or 5.6.1 or greater and use different encoding/decoding schemes as appropriate. (Thanks to the Arvato folks for providing the post-5.6.1 version...)

Documentation

User Guide and Reference Manual for SPOPS
How SPOPS builds classes
Description of variables used in the SPOPS configuration process
Recipes for SPOPS usage
SPOPS datasource use and how you can customize
Error handling in SPOPS
Moving data (and more) with SPOPS
Introduction and overview of SPOPS
Shows how you interact with SPOPS objects.
Use rules to give your object custom behavior
SPOPS object relationships
SPOPS security system and how you can customize
How SPOPS serializes objects
Perform tests on a DBD driver to see if it may work with SPOPS

Modules

Simple Perl Object Persistence with Security
Create SPOPS classes from configuration and code
Define additional configuration methods
Default configuration methods called from SPOPS.pm
Create relationships among LDAP objects
Implement SPOPS class, serializing into a DBI database
InterBase-specific routines for the SPOPS::DBI
MySQL-specific code for DBI collections
Oracle-specific routines for the SPOPS::DBI
PostgreSQL-specific routines for the SPOPS::DBI
SQLite-specific code for DBI collections
Sybase-specific routines for the SPOPS::DBI
Represent type information for a single table
(DEPRECATED) Centralized error messages from all SPOPS objects.
Base class for exceptions in SPOPS
SPOPS exception with extra DBI parameters
SPOPS exception with extra LDAP parameters
SPOPS exception with extra security parameters
Export SPOPS objects to various formats
Export SPOPS objects as data for importing directly into a DBI table
Dump SPOPS objects to a portable format
Dump SPOPS objects to a pure serialized Perl format
Export SPOPS objects as a series of SQL statements
Export SPOPS objects in XML format
Store SPOPS objects in a GDBM database
Implement as objects files containing perl hashrefs dumped to text
Factory and parent for importing SPOPS objects
Import raw data to a DBI table
Import a DBI table structure
Factory class for database-specific transformations
Table transformations for InterBase/FirebirdSQL
Table transformations for MySQL
Table transformations for Oracle
Table transformations for PostgreSQL
Table transformations for SQLite
Table transformations for Sybase/MSSQL
Import SPOPS objects
Provide methods for initializing groups of SPOPS objects at once
Class to cycle through results and return SPOPS objects
Implementation of SPOPS::Iterator for SPOPS::DBI
Implementation of SPOPS::Iterator for SPOPS::LDAP
SPOPS::Iterator wrapper around object lists
Retrieve an auto-increment value from a DBI statement or database handle
Retrieve IDENTITY values from a supported DBI database
Retrieves ID field information from a pool
Retrieve sequence values from a supported DBI database
Creates a random alphanumeric code for the ID field
Creates a Universally Unique ID (UUID) as a key
Implement object persistence in an LDAP datastore
SPOPS::LDAP functionality but fetching objects from multiple datasources
Simple SPOPS class used for testing rules and other goodies
Generic routines for DBI database interaction
Implement security across one or more classes of SPOPS objects
Implement a security object and basic operations for DBI datasources
Define hierarchical security
Security object implementation for testing (loopback) objects
Common utilities for SPOPS::Secure and subclasses
Simple class implementing tied hash with some goodies
Enable field checking for SPOPS objects
Make a particular object create-only -- it cannot be updated
Embed the parameters for a DBI handle in object configuration
SPOPS::ClassFactory rule implementing autofield discovery
Load default values from a particular record
Support objects that automatically maintain a link to the previous and next objects
Convert dates to objects to/from your datastore
Embed the parameters for a LDAP handle in object configuration
Make a particular object read-only
Provide automatic UTF-8 conversion
Utility methods for SPOPS objects

Provides

in SPOPS/HashFile.pm