Data-Util
view release on metacpan or search on metacpan
lib/Data/Util.pm view on Meta::CPAN
C<subroutine_modifier()> is property accessors, but it does not bless the
modified subroutines.
=item subroutine_modifier(subr)
Returns whether I<subr> is a modified subroutine.
=item subroutine_modifier(modified_subr, property)
Gets I<property> from I<modified>.
Valid properties are: C<before>, C<around>, C<after>.
=item subroutine_modifier(modified_subr, modifier => [subroutine(s)])
Adds subroutine I<modifier> to I<modified_subr>.
Valid modifiers are: C<before>, C<around>, C<after>.
=item mkopt(input, moniker, require_unique, must_be)
Produces an array of an array reference from I<input>.
It is compatible with C<Data::OptList::mkopt()>. In addition to it,
I<must_be> can be a HASH reference with C<< name => type >> pairs.
For example:
my $optlist = mkopt(['foo', bar => [42]], $moniker, $uniq, { bar => 'ARRAY' });
# $optlist == [[foo => undef], [bar => [42]]
=item mkopt_hash(input, moniker, must_be)
Produces a hash reference from I<input>.
It is compatible with C<Data::OptList::mkopt_hash()>. In addition to it,
I<must_be> can be a HASH reference with C<< name => type >> pairs.
For example:
my $optlist = mkopt(['foo', bar => [42]], $moniker, { bar => 'ARRAY' });
# $optlist == {foo => undef, bar => [42]}
=back
=head1 ENVIRONMENT VARIABLES
=head2 DATA_UTIL_PUREPERL
If true, C<Data::Util> uses the pure Perl implementation.
=head1 DEPENDENCIES
Perl 5.10 or later.
If you have a C compiler, you can use the XS backend.
A pure Perl backend/implementation is also made available in case you have no C
compiler handy (unlikely!).
=head1 BUGS AND LIMITATIONS
No bugs have been reported.
Please report any bugs or feature requests to the author.
=head1 SEE ALSO
L<Scalar::Util>.
L<overload>.
L<Params::Util>.
L<Sub::Install>.
L<Sub::Identify>.
L<Sub::Delete>.
L<Sub::Curry>.
L<Class::MOP>.
L<Class::Method::Modifiers>.
L<Data::OptList>.
L<Mouse>
=head1 AUTHOR
Goro Fuji(gfx) E<lt>gfuji(at)cpan.orgE<gt>.
=head1 LICENSE AND COPYRIGHT
Copyright (c) 2008-2010, Goro Fuji E<lt>gfuji(at)cpan.orgE<gt>. All rights reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
=cut
( run in 2.242 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )