Scroll to navigation

Catmandu::Util::Path(3pm) User Contributed Perl Documentation Catmandu::Util::Path(3pm)

NAME

Catmandu::Util::Path - Path related utility functions

FUNCTIONS

Returns 1 if the given string is a path, 0 otherwise. Only recognizes Catmandu::Path::simple paths prefixed with a dollar sign at the moment.

    looks_like_path("$.foo.bar.$append")
    # => 1
    looks_like_path("waffles")
    # => 0
    
Helper function that returns a Catmandu::Path instance for the given path string. The optional $type argument gives preliminary support for alternative path implementations and defaults to 'simple'.

    as_path("$.foo.bar.$append")
    # is equivalent to
    Catmandu::Path::simple->new(path => "$.foo.bar.$append");
    
2023-03-03 perl v5.36.0