Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Data::DPath::Filters

Name Data::DPath::Filters
Version 0.58
Located at /usr/share/perl5
File /usr/share/perl5/Data/DPath/Filters.pm
Is Core No
Search CPAN for this module Data::DPath::Filters
Documentation Data::DPath::Filters
Module Details Data::DPath::Filters


NAME

Data::DPath::Filters - Magic functions available inside filter conditions


API METHODS

affe

Mysterious test function. Will vanish. Soon. Or will it really? No, probably not. I like it. :-)

Returns true if the value eq ``affe''.

idx

Returns the current index inside array elements.

Please note that the current matching elements might not be in a defined order if resulting from anything else than arrays.

size

Returns the size of the current element. If it is an array ref it returns the number of elements, if it is a hash ref it returns number of keys, if it is a scalar it returns 1, everything else returns -1.

key

If it is a hashref returns the key under which the current element is associated as value. Else it returns undef.

This gives the key() function kind of a ``look back'' behaviour because the associated point is already after that key.

value

Returns the value of the current element.

isa

Frontend to UNIVERSAL::isa. True if the current element is_a given class.

reftype

Frontend to Scalar::Util::reftype.

Returns Scalar::Util::reftype of current element $_. With this you can do comparison by yourself with eq, =~, ~~ or whatever in filter expressions.

is_reftype($EXPECTED_TYPE)

Frontend to Scalar::Util::reftype.

Checks whether Scalar::Util::reftype of current element $_ equals the provided argument $EXPECTED_TYPE and returns true/false.


AUTHOR

Steffen Schwigon <ss5@renormalist.net>


COPYRIGHT AND LICENSE

This software is copyright (c) 2019 by Steffen Schwigon.

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

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026