Data::...h::Path(3pm)
๐ Data::DPath::Path โ the manual, but make it make sense ๐
okay so bestie, you found Data::DPath::Path(3pm) and honestly? good for you. this is a Perl thing, from the User Contributed Perl Documentation, and it's literally the class that turns a DPath string into a thing you can actually use. let's go ๐ฆ
โจ NAME โจ
Data::DPath::Path โ an abstraction for a DPath. periodt.
๐ธ ABOUT ๐ธ
so here's the vibe: you hand it a string description, it parses that string, and then it gives you frontend methods to play with. that's it, that's the whole personality. parse and serve ๐
๐ PUBLIC METHODS ๐
new ( %args )
the constructor, babes. it creates the instance. slay.
Args:
give_referencesโ default is0. if you set it to a true value, then the results you get back are references to the matched points in the data structure. not copies. references. iykyk ๐ฅ
match( $data )
returns an array of all the values in $data that match the Path object. all of them. the whole squad. ๐
matchr( $data )
same energy as match, but it returns an array ref of all the values in $data that match the Path object. the r is for ref, bestie, it's giving consistency โจ
๐ฎ INTERNAL METHODS ๐ฎ
ngl these are the backstage crew. don't touch them unless you know what you're doing, fr fr.
op_match( $self, $data )
this sub/method is bound as the overloading function for ~~. yes, the smartmatch operator. iconic.
quoted
checks whether a path part starts with quotes. that's the whole job. ๐
unquote
removes surrounding quotes. bye girl ๐
unescape
converts backslashed characters into their non-backslashed form. the backslashes simply had to go ๐
_build__steps
okay this one is the one. this method is essentially the DPath parser, because it tokenizes the path into single steps, and the later execution of those steps is the base functionality of the whole DPath module. main character energy, no cap ๐
path
attribute / accessor. simple as that.
_steps
attribute / accessor. also simple. also iconic.
give_references
attribute / accessor. yeah, the same one from the constructor. she contains multitudes ๐
๐ aliased classes ๐
this is just to make Pod::Coverage happy, because Pod::Coverage does not handle aliased modules. so we list them here and everyone can chill ๐
ContextPointStep
๐ AUTHOR ๐
Steffen Schwigon <ss5@renormalist.net>
๐ COPYRIGHT AND LICENSE ๐
this software is copyright (c) 2024 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. so like, go off, but responsibly ๐ซถ
and that's the whole page, bestie!! ๐ธ๐ฆโจ this was perl v5.40.0, dated 2024-10-05, from the Data::...h::Path(3pm) page in the User Contributed Perl Documentation โ mwah, slay, bye ๐๐
๐ฆ where this page comes from
- ubuntu resolute: libdata-dpath-perl 0.60-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdata-dpath-perl 0.60-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms