NAME
Util::Any - Export any utilities and To create your own Util::Any
VERSION
Version 0.01
SYNOPSIS
use Util::Any qw/list/;
# you can import any functions of List::Util and List::MoreUtils
print uniq qw/1, 0, 1, 2, 3, 3/;
If you want to choose functions
use Util::Any {list => qw/uniq/};
# you can import uniq function, not import other functions
print uniq qw/1, 0, 1, 2, 3, 3/;
If you want to import All kind of utility functions
use Util::Any qw/all/;
If you want to import functions with prefix(ex. list_, scalar_, hash_)
use Util::Any qw/all/, {prefix => 1};
use Util::Any qw/list/, {prefix => 1};
use Util::Any {List => qw/uniq/}, {prefix => 1};
print list_uniq qw/1, 0, 1, 2, 3, 3/;
DESCRIPTION
For the people who cannot remember uniq function is in whether List::Util or List::MoreUtils.
EXPORT
Functions which are exported by List::Util, List::MoreUtils, Hash::Util.
FUNCTIONS
no functions.
CREATE YOUR OWN Util::Any
Just inherit Util::Any and define %Utils as the following.
package Util::Yours;
use base qw/Util::Any/;
our %Utils = %Util::Any::Utils;
push @{$Utils{list}}, qw/Your::Favorite::List::Utils/;
1;
In your code;
use Util::Yours qw/list/;
PREFIX FOR EACH MODULE
If you want to import many modules and they have same function name. You can specify prefix for each module like the following.
use base qw/Util::Any/;
our %Utils = (
list => [['List::Util' => 'lu_'], ['List::MoreUtils' => 'lmu_']]
);
In your code;
use Util::Yours qw/list/, {module_prefix => 1};
AUTHOR
Ktat, <ktat at cpan.org>
BUGS
Please report any bugs or feature requests to bug-util at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Util-Any. 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 Util::Any
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2008 Ktat, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.