Attribution
Two kinds: Handle Attributes and Method Attributes
A DBI handle is a reference to a hash
Handle Attributes can be read or set by accessing the hash
$h->{AutoCommit} = 0;
$autocomitting = $h->{AutoCommit};
Some attributes are read-only
$sth->{NUM_OF_FIELDS} = 42; # fatal error
Many DBI methods take an ‘attributes’ parameter
- in the form of a reference to a hash of key-value pairs
The attributes parameter is typically used to provide ‘hints’ to the driver
- Unrecognised attributes are ignored
The method attributes are generally unrelated to handle attributes
- The DBI->connect(…) method is an exception