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$keyto$h.$hmust 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).