All the parameters are optional, but at least one of them is required due to the sheer volume of data this module tends to generate. If multiple parameters are passed, they are additive, i.e. use AND to combine themselves.

ip_ranges

Allows restricting the search to ranges of IPs. Can be given in either dot-decimal notation (n.n.n.n) or as an integer.

events

Allows searching on specific events.

subjects

Allows to search on the subject types and subject IDs passed when calling record(). Multiple subject types can be passed, and for each subject type multiple IDs can be passed, hence the use of an arrayref of hashes for this parameter. Using

Searches on the ID of the account that was logged in at the time of the record() call.

affected

Searches on the ID of the account that was linked to the data that changed at the time of the record() call.

Optional parameters that are not search criteria:

database_handle

A specific database handle to use when searching for audit events. This allows the use of a separate reader database for example, to do expensive search queries. If this parameter is omitted, then the database handle specified when calling new() is used.

order_by

An arrayref of fields and corresponding sort orders to use for sorting. By default, the audit events are sorted by ascending created date.

get_cache()

set_cache()

insert_event()

Insert an audit event in the database.

my $audit_event = $audit->insert_event( \%data );

Important: note that this is an internal function that record() calls. You should be using record() instead. What you can do with this function is to subclass it if you need to extend/change how events are inserted, for example:

if you want to stash it into a register_cleanup() when you're making the all in Apache context (so that audit calls don't slow down the main request);

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/