#!/usr/bin/env perl # vim: sts=3 ts=3 sw=3 et ai : use strict; use warnings; use Data::Dumper; $Data::Dumper::Indent = 1; use Data::Tubes qw< pipeline >; use Log::Log4perl::Tiny qw< :easy LOGLEVEL >; my $input = <<'END'; Foo Barious:Baz\: The Definitive Guide:2016 END pipeline( 'Source::open_file', 'Reader::by_line', [ 'Parser::by_format' => 'Author:Title:Year', value => qr{(?mxs: [^\\] | \\. )*?}, ], sub { $_[0]{rendered} = Dumper($_[0]{structured}); return $_[0]; }, 'Writer::to_files', {tap => 'sink'}, )->(\$input);