Catmandu::Fix::Datahub::Util(3pm)

Catmandu::Fix::Datahub::Util3pm

Utility functions and generic fixes developed for the datahub project

Usage

  use Catmandu::Fix::Datahub::Util;

Overview

  use Catmandu::Fix::Datahub::Util;
"declare_source($fixer, $var, $declared_var)"

For an item $var, which is a path (as a string) in a Catmandu fix, assign the value at the path to $declared_var, which is a variable that was previously declared in the fix code:

  my $f_var = $self->fixer->generate_var();
  $code .= "my ${f_var};";
  $code .= declare_source($self->fixer, 'foo.bar', $f_var);
"walk($fixer, $path, $key, $h)"

Walk through a $path (as an arrayref) until at $key. Assign the value of $key to $h. $h must be declared in the fix code.

  my $f_var = $self->fixer->generate_var();
  $code .= "my ${f_var};";
  $code .= walk($self->fixer, ['foo', 'bar'], $f_var);

Releases

Unchanged in 2 releases since Debian 12 (Bookworm).

  1. 12–13

Author

Pieter De Praetere <[email protected]>

License

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

From libcatmandu-fix-datahub-perl 0.03-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.