Data-Util

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN


    This seems a constructor of modified subroutines and
    `subroutine_modifier()` is property accessors, but it does not bless the
    modified subroutines.

- subroutine\_modifier(subr)

    Returns whether _subr_ is a modified subroutine.

- subroutine\_modifier(modified\_subr, property)

    Gets _property_ from _modified_.

    Valid properties are: `before`, `around`, `after`.

- subroutine\_modifier(modified\_subr, modifier => \[subroutine(s)\])

    Adds subroutine _modifier_ to _modified\_subr_.

    Valid modifiers are: `before`, `around`, `after`.

- mkopt(input, moniker, require\_unique, must\_be)

    Produces an array of an array reference from _input_.

    It is compatible with `Data::OptList::mkopt()`. In addition to it,
    _must\_be_ can be a HASH reference with `name => type` pairs.

    For example:

            my $optlist = mkopt(['foo', bar => [42]], $moniker, $uniq, { bar => 'ARRAY' });
            # $optlist == [[foo => undef], [bar => [42]]

- mkopt\_hash(input, moniker, must\_be)

    Produces a hash reference from _input_.

    It is compatible with `Data::OptList::mkopt_hash()`. In addition to it,
    _must\_be_ can be a HASH reference with `name => type` pairs.

    For example:

            my $optlist = mkopt(['foo', bar => [42]], $moniker, { bar => 'ARRAY' });
            # $optlist == {foo => undef, bar => [42]}

# ENVIRONMENT VARIABLES

## DATA\_UTIL\_PUREPERL

If true, `Data::Util` uses the pure Perl implementation.

# 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!).

# BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to the author.

# SEE ALSO

[Scalar::Util](https://metacpan.org/pod/Scalar%3A%3AUtil).

[overload](https://metacpan.org/pod/overload).

[Params::Util](https://metacpan.org/pod/Params%3A%3AUtil).

[Sub::Install](https://metacpan.org/pod/Sub%3A%3AInstall).

[Sub::Identify](https://metacpan.org/pod/Sub%3A%3AIdentify).

[Sub::Delete](https://metacpan.org/pod/Sub%3A%3ADelete).

[Sub::Curry](https://metacpan.org/pod/Sub%3A%3ACurry).

[Class::MOP](https://metacpan.org/pod/Class%3A%3AMOP).

[Class::Method::Modifiers](https://metacpan.org/pod/Class%3A%3AMethod%3A%3AModifiers).

[Data::OptList](https://metacpan.org/pod/Data%3A%3AOptList).

[Mouse](https://metacpan.org/pod/Mouse)

# AUTHOR

Goro Fuji(gfx) <gfuji(at)cpan.org>.

# LICENSE AND COPYRIGHT

Copyright (c) 2008-2010, Goro Fuji <gfuji(at)cpan.org>. All rights reserved.

This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.



( run in 3.165 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )