NAME
Audit::DBI::Event - An event as logged by the Audit::DBI module.
VERSION
Version 1.9.0
SYNOPSIS
use Audit::DBI::Event;
my $audit_event = Audit::DBI::Event->new(
data => $data, #mandatory
);
my $audit_event_id = $audit_event->get_id();
my $information = $audit_event->get_information();
my $diff = $audit_event->get_diff();
my $ipv4_address = $audit_event->get_ipv4_address();
METHODS
new()
Create a new Audit::DBI::Event object.
my $audit_event = Audit::DBI::Event->new(
data => $data, #mandatory
);
Note that you should never have to instantiate Audit::DBI::Event objects directly. They are normally created by the Audit::DBI module.
ACCESSORS
get_id()
Return the audit event ID.
my $audit_event_id = $audit_event->get_id();
get_information()
Retrieve the extra information stored, if any.
my $information = $audit_event->get_information();
get_diff()
Retrieve the diff information stored, if any.
my $diff = $audit_event->get_diff();
get_diff_string_bytes()
Return the size in bytes of all the text changes recorded inside the diff information stored for the event.
This method can use two comparison types to calculate the size of the changes inside a diff:
Relative comparison (by default):
In this case, a string change from 'TestABC' to 'TestCDE' is a 0 bytes change (since there is the same number of characters).
my $diff_bytes = $audit_event->get_diff_string_bytes();
Absolute comparison:
In this case, a string change from 'TestABC' to 'TestCDE' is a 6 bytes change (3 characters removed, and 3 added).
my $diff_bytes = $audit_event->get_diff_string_bytes( absolute => 1 );
Note that absolute comparison requires String::Diff to be installed.
get_ipv4_address()
Return the IPv4 address associated with the audit event.
my $ipv4_address = $audit_event->get_ipv4_address();
BUGS
Please report any bugs or feature requests through the web interface at https://github.com/guillaumeaubert/Audit-DBI/issues/new. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Audit::DBI::Event
You can also look for information at:
GitHub's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
MetaCPAN
AUTHOR
Guillaume Aubert, <aubertg at cpan.org>
.
COPYRIGHT & LICENSE
Copyright 2010-2017 Guillaume Aubert.
This code is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.
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 LICENSE file for more details.