Audit::DBI::Utils - Utilities for the Audit::DBI distribution.
Version 1.5.1
use Audit::DBI::Utils; my $ip_address = Audit::DBI::Utils::integer_to_ipv4( $integer ); my $integer = Audit::DBI::Utils::ipv4_to_integer( $ip_address ); my $differences = Audit::DBI::Utils::diff_structures( $data_structure_1, $data_structure_2, comparison_function => sub { my ( $a, $b ) = @_; $a eq $b; }, #optional );
my $string = Audit::DBI::Utils::stringify_data_structure( data_structure => $data_structure, object_stringification_map => { 'Math::Currency' => 'as_float', }, );
Convert a 32-bits integer representing an IP address into its IPv4 form.
my $ip_address = Audit::DBI::Utils::integer_to_ipv4( $integer );
Convert an IPv4 address to a 32-bit integer.
my $integer = Audit::DBI::Utils::ipv4_to_integer( $ip_address );
Return the differences between the two data structures passed as parameter.
If provided, the "equality_function" parameter provides a coderef to an alternative equality function for comparison of the scalars in the leaf nodes of the data structures. By default, 'eq' is used, but by providing a function that takes two parameters, diff_structures will perform any equality test.
my $differences = Audit::DBI::Utils::diff_structures( $data_structure_1, $data_structure_2, comparison_function => sub { my ( $a, $b ) = @_; $a eq $b; }, #optional );
Guillaume Aubert, <aubertg at cpan.org>.
<aubertg at cpan.org>
Please report any bugs or feature requests to bug-audit-dbi at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Audit-DBI. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-audit-dbi at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Audit::DBI::Utils
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Audit-DBI
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Audit-DBI
CPAN Ratings
http://cpanratings.perl.org/d/Audit-DBI
Search CPAN
http://search.cpan.org/dist/Audit-DBI/
Thanks to ThinkGeek (http://www.thinkgeek.com/) and its corporate overlords at Geeknet (http://www.geek.net/), for footing the bill while I write code for them!
Copyright 2012 Guillaume Aubert.
This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Audit::DBI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Audit::DBI
CPAN shell
perl -MCPAN -e shell install Audit::DBI
For more information on module installation, please visit the detailed CPAN module installation guide.