NAME
Zeta::Util
VERSION
Version 0.02
SYNOPSIS
use Zeta::Util qw(:ALL);
...
sub example {
my %opts = get_opts(@_);
...
}
EXPORT
Nothing is exported by default. The following items are available:
FUNCTIONS ##############################################################################
get_opts
Generic method of getting arguments passed to a function as a hash or an array. Automatically converts a hash reference into a hash. If a single scalar argument or an object reference is passed then it will be returned as a hash using the key defined by $Zeta::Util::get_opts_scalar_key (default:arg1). An array reference or an odd number of arguments will be converted and returned as a list (array).
NOTE: If an odd number of arguments are passed and returned as a list (array), and a hash is expected, and warnings are enabled (use warnings), then the warning "Odd number of elements in hash assignment" will be displayed.
If called in scalar context, get_opts will return a hash ref. Otherwise get_opts returns a hash.
_b_cmp_flags
Internal procedure, not meant to be used outside this module, not in export_ok
is_type_string
is_type_int
is_type_float
is_string
is_int
is_float
is_numeric
get_file_details
Returns a hashref containing details about the specified file. Returns undef if the file is not defined, does not exist, or is not readable.
Example of returned hashref: $VAR1 = { 'filetype' => 'file', 'blocks' => 8, 'blocksize' => 4096, 'mode' => '0664', 'size' => 387, 'hardlinks' => 1, 'file_name' => '05-fileinfo', 'mode_dec' => 436, 'ctime' => 1334455408, 'rdev' => 0, 'filetype_dec' => 32768, 'uid' => 501, 'mtime' => 1334455408, 'file_extension' => 't', 'path' => 't/', 'device' => 234881027, 'inode' => 6282915, 'filename' => '05-fileinfo.t', 'fullname' => 't/05-fileinfo.t', 'atime' => 1334455410, 'gid' => 20 };
is_mod_perl
Checks to see if mod_perl is detected. This is done by looking for the MOD_PERL environment variable. Returns 1 (TRUE) if found, or 0 (FALSE) if not.
is_empty
Returns true if variable is not defined or equal to ''
is_blank
Returns true if variable is not defined, equal to '', or contains nothing but whitespace (/^\s*$/).
no_undef
Returns the variable passed to it, unchanged, unless the variable has a value of undef, in which case it returns ''.
AUTHOR
Gregory S. Youngblood, <zeta at cpan.org>
BUGS
Please report any bugs or feature requests to bug-zeta-tools at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Zeta-Tools. 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 Zeta::Util
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 1995-2012 Gregory S. Youngblood, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.