Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

paranoid::log::buffer(3pm) [debian man page]

Paranoid::Log::Buffer(3pm)				User Contributed Perl Documentation				Paranoid::Log::Buffer(3pm)

NAME
Paranoid::Log::Buffer - Log Buffer Functions VERSION
$Id: Buffer.pm,v 0.83 2010/06/03 19:03:46 acorliss Exp $ SYNOPSIS
use Paranoid::Log; enableFacility('events', 'buffer', 'debug', '+'); enableFacility('more-events', 'buffer', 'debug', '+', 100); @messages = Paranoid::Log::Buffer::dump($name); DESCRIPTION
This module implements named buffers to be used for logging purposes. Each buffer is of a concrete size (definable by the developer) with a max message length of 2KB. Each message is stored with a timestamp. Once the buffer hits the maximun number of entries it begins deleting the oldest messages as the new messages come in. Buffers are created automatically on the fly, and messages trimmed before being stored. With the exception of the dump function this module is not meant to be used directly. Paranoid::Log should be your exclusive interface for logging. When enabling a buffer facility with Paranoid::Log you can add one integral argument to the call. That number defines the size of the log buffer in terms of number of entries allowed. NOTE: Buffers are maintained within process memory. If you fork a process from a parent with a log buffer each copy will maintain its own entries. SUBROUTINES
/METHODS NOTE: Given that this module is not intended to be used directly nothing is exported. init log remove Paranoid::Log::Buffer::dump @entries = Paranoid::Log::Buffer::dump($name); This dumps all current entries in the named buffer. Each entry is an array reference to a two-element array. The first element is the timestamp of the message (in UNIX epoch seconds), the second the actual message itself. DEPENDENCIES
o Paranoid::Debug SEE ALSO
o Paranoid::Log BUGS AND LIMITATIONS
AUTHOR
Arthur Corliss (corliss@digitalmages.com) LICENSE AND COPYRIGHT
This software is licensed under the same terms as Perl, itself. Please see http://dev.perl.org/licenses/ for more information. (c) 2005, Arthur Corliss (corliss@digitalmages.com) perl v5.14.2 2010-06-03 Paranoid::Log::Buffer(3pm)

Check Out this Related Man Page

Paranoid::Network::IPv6(3pm)				User Contributed Perl Documentation			      Paranoid::Network::IPv6(3pm)

NAME
Paranoid::Network::IPv6 - IPv6-related functions VERSION
$Id: IPv6.pm,v 0.1 2012/05/29 21:37:44 acorliss Exp $ SYNOPSIS
DESCRIPTION
This module contains a few convenience functions for working with IPv6 addresses. By default only the subroutines themselves are imported. Requesting :all will also import the constants as well. SUBROUTINES
/METHODS ipv6NetConvert @net = ipv6NetConvert($netAddr); This function takes an IPv4 network address in string format and converts it into and array of arrays. The arrays will contain the base network address, the broadcast address, and the netmask, each split into native 32bit integer format chunks. Each sub array is essentially what you would get from: @chunks = unpack 'NNNN', inet_pton(AF_INET6, '::1'); using '::1' as the sample IPv6 address. The network address must have the netmask in CIDR format. In the case of a single IP address, the array with only have one subarray, that of the IP itself, split into 32bit integers. Passing any argument to this function that is not a string representation of an IP address (including undef values) will cause this function to return an empty array. ipv6NetPacked @net = ipv6NetPacked('fe80::/64'); This function is a wrapper for ipv6NetConvert, but instead of subarrays each element is the packed (opaque) string as returned by inet_pton. ipv6NetIntersect $rv = ipv6NetIntersect($net1, $net2); This function tests whether an IP or subnet intersects with another IP or subnet. The return value is essentially boolean, but the true value can vary to indicate which is a subset of the other: -1: destination range encompasses target range 0: both ranges do not intersect at all 1: target range encompasses destination range The function handles the same string formats as ipv6NetConvert, but will allow you to test single IPs in integer format as well. CONSTANTS
These are only imported if explicity requested or with the :all tag. MAXIPV6CIDR Simply put: 64. This is the largest CIDR notation supported in IPv6. IPV6REGEX Regular expression: qr/ :(?::[abcdefd]{1,4}){1,7} | [abcdefd]{1,4}(?:::?[abcdefd]{1,4}){1,7} | (?:[abcdefd]{1,4}:){1,7}: /smix; You can use this for validating IP addresses as such: $ip =~ m#^@{[ IPV6REGEX ]}$#; or to extract potential IPs from extraneous text: (@ips) = ( $string =~ m#(@{[ IPV6REGEX ]})#g); IPV6CIDRRGX Regular expression: qr#(@{[ IPV6REGEX ]})(?:/(d+))?#sm By default this will extract an IP or CIDR notation network address: ($net, $mask) = ( $ip =~ m#^@{[ IPV6CIDRRGX ]}$# ); In the case of a simple IP address $mask will be undefined. IPV6BASE This is the ordinal index of the base network address as returned by ipv6NetConvert. IPV6BRDCST This is the ordinal index of the broadcast address as returned by ipv6NetConvert. IPV6MASK This is the ordinal index of the network mask as returned by ipv6NetConvert. DEPENDENCIES
o Paranoid o Paranoid::Network::Socket BUGS AND LIMITATIONS
AUTHOR
Arthur Corliss (corliss@digitalmages.com) LICENSE AND COPYRIGHT
This software is licensed under the same terms as Perl, itself. Please see http://dev.perl.org/licenses/ for more information. (c) 2012, Arthur Corliss (corliss@digitalmages.com) perl v5.14.2 2012-05-29 Paranoid::Network::IPv6(3pm)
Man Page