Catmandu::Util::Path(3pm)

Catmandu::Util::Path3pm

Path related utility functions

Functions

looks_like_path($str)

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
as_path($str, $type)

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");

Releases

3 releases since Debian 11 (Bullseye); the text changed 2 times.

  1. 11
  2. 12
  3. 13

From libcatmandu-perl 1.2024-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.