This is a collection of recipes for usage of SPOPS.
Some are common,
some might be esoteric,
but all of them should help to illuminate how SPOPS works and ways that you can expand it for your own needs.

SPOPS implementations that rely on some sort of datasource connection need to make that connection available all objects and class methods that need it.
You can also pass a connection around to all calls,
but this becomes difficult to maintain and is generally only used for special cases.

All implementations use the method global_datasource_handle() to retrieve the needed connection.
So if you make the connection available via this method you never have to pass around handles or even worry about it.

There are generally two ways (which are basically the same) to do this:

Make the handle available via a method in the SPOPS object class itself.

Make the handle available via a method in the ancestor class.

Both are demonstrated below,
using the SPOPS::DBI implementation as an example.