Catmandu::Fix::Has - helper class for creating Fix-es with (optional) parameters
package Catmandu::Fix::foo; use Moo; use Catmandu::Fix::Has; has greeting => (fix_arg => 1); # required parameter 1 has message => (fix_arg => 1); # required parameter 2 has eol => (fix_opt => '!'); # optional parameter 'eol' with default '!' sub fix { my ($self,$data) = @_; print STDERR $self->greeting . ", " . $self->message . $self->eol . "\n"; $data; } 1;
Catmandu::Fix
To install Catmandu, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu
CPAN shell
perl -MCPAN -e shell install Catmandu
For more information on module installation, please visit the detailed CPAN module installation guide.