NAME
Net::FastCGI::Util - Provides utility functions and constants intended for internal use only.
SYNOPSIS
carp('Foo Bar');
carpf('Foo %s' 'Bar');
croak('Foo Bar');
croakf('Foo %s', 'Bar');
$boolean = is_cvref($scalar);
$boolean = is_hvref($scalar);
$boolean = is_instance_of($scalar, $class);
$boolean = is_object($scalar);
$boolean = is_octets($scalar);
$boolean = is_octets_ge($scalar, $minimum);
$boolean = is_octets_le($scalar, $maximum);
$boolean = is_uint($scalar);
$boolean = is_uint8($scalar);
$boolean = is_uint16($scalar);
$boolean = is_uint31($scalar);
$boolean = is_uint32($scalar);
DESCRIPTION
Provides utility functions and constants intended for internal use within Net::FastCGI
.
FUNCTIONS
carp
Usage
carp(@message);
Arguments
carpf
Usage
carpf($format, @list);
Arguments
croak
Usage
croak(@message);
Arguments
croakf
Usage
croakf($format, @list);
Arguments
is_cvref
Usage
$boolean = is_cvref($scalar);
$boolean = is_cvref( sub {} ); # true
$boolean = is_cvref( \&is_cvref ); # true
$boolean = is_cvref( bless(sub {}) ); # false
Arguments
Returns
is_hvref
Usage
$boolean = is_hvref($scalar);
$boolean = is_hvref( {} ); # true
$boolean = is_hvref( bless({}) ); # false
Arguments
Returns
is_handle
Usage
$boolean = is_handle($scalar);
$boolean = is_handle(*STDOUT); # true
$boolean = is_handle(\*STDOUT); # true
$boolean = is_handle(IO::Handle->new); # true
$boolean = is_handle(IO::String->new); # true
$boolean = is_handle(STDOUT); # false
Arguments
Returns
is_instance_of
Usage
$boolean = is_instance_of($scalar, $class);
Arguments
Returns
is_object
Usage
$boolean = is_object($scalar);
Arguments
Returns
is_octets
Usage
$boolean = is_octets($scalar);
Arguments
Returns
is_octets_ge
Usage
$boolean = is_octets_ge($scalar, $low);
Arguments
Returns
$boolean
-
A boolean indicating whether or not
$scalar
is octets and is greater than or equal to$low
in length.
is_octets_le
Usage
$boolean = is_octets_le($scalar, $high);
Arguments
Returns
$boolean
-
A boolean indicating whether or not
$scalar
is octets and is less than or equal to$high
in length.
is_uint
Usage
$boolean = is_uint($scalar);
Arguments
Returns
is_uint8
Usage
$boolean = is_uint8($scalar);
Arguments
Returns
is_uint16
Usage
$boolean = is_uint16($scalar);
Arguments
Returns
is_uint31
Usage
$boolean = is_uint31($scalar);
Arguments
Returns
is_uint32
Usage
$boolean = is_uint32($scalar);
Arguments
Returns
CONSTANTS
ERRMSG_CVREF
Argument "%s" is not a CODE reference
ERRMSG_HVREF
Argument "%s" is not a HASH reference
ERRMSG_INSTANCE_OF
Argument "%s" is not an instance of "%s"
ERRMSG_OCTETS_GE
Argument "%s" must be greater than or equal to %u octets in length
ERRMSG_OCTETS_LE
Argument "%s" must be less than or equal to %u octets in length
ERRMSG_OFFSET
Argument "%s" is outside of octets length
ERRMSG_UINT
Argument "%s" is not an unsigned integer
ERRMSG_UINT8
Argument "%s" is not an unsigned 8-bit integer
ERRMSG_UINT16
Argument "%s" is not an unsigned 16-bit integer
ERRMSG_UINT31
Argument "%s" is not an unsigned 31-bit integer
ERRMSG_UINT32
Argument "%s" is not an unsigned 32-bit integer
ERRMSG_VERSION
Unsupported FastCGI version: %u
EXPORTS
None by default. Functions and constants can either be imported individually or in sets grouped by tag names. The tag names are:
:all
exports all functions and constants.:carp
exportscarp
,carpf
,croak
, andcroakf
.:errmsg
exports allERRMSG_
constants.:predicate
exports allis_
functions.:common
exports:carp
,:errmsg
and:predicate
.
AUTHOR
Christian Hansen chansen@cpan.org
COPYRIGHT
Copyright (c) 2008 Christian Hansen. All rights reserved.
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.